|
#define | LTC6953_NUM_REGADDR 57 |
|
#define | LTC6953_REG_VCO_STATUS 0x00 |
|
#define | LTC6953_REG_STAT 0x01 |
|
#define | LTC6953_REG_PD_CTL 0x02 |
|
#define | LTC6953_REG_CHAN_POWER_DOWN(x) 0x03 + (x / 4) |
|
#define | LTC6953_REG_TEMP 0x05 |
|
#define | LTC6953_REG_SYNC_CONFIG 0x0B |
|
#define | LTC6953_REG_OUTPUT_DIVIDER(x) 0x0C + (x * 4) |
|
#define | LTC6953_REG_OUTPUT_CONFIG(x) 0x0D + (x * 4) |
|
#define | LTC6953_REG_DDEL_HIGH(x) 0x0D + (x * 4) |
|
#define | LTC6953_REG_DDEL_LOW(x) 0x0E + (x * 4) |
|
#define | LTC6953_REG_ADEL(x) 0x0F + (x * 4) |
|
#define | LTC6953_REG_CHIP_INFO 0x38 |
|
#define | LTC6953_VCOOK_MSK NO_OS_BIT(2) |
|
#define | LTC6953_NVCOOK_MSK NO_OS_BIT(3) |
|
#define | LTC6953_INVSTAT_MSK NO_OS_BIT(7) |
|
#define | LTC6953_STAT_OUT_MSK NO_OS_GENMASK(6, 0) |
|
#define | LTC6953_PDALL_MSK NO_OS_BIT(7) |
|
#define | LTC6953_PDVCOPK_MSK NO_OS_BIT(5) |
|
#define | LTC6953_FILTV_MSK NO_OS_BIT(1) |
|
#define | LTC6953_POR_MSK NO_OS_BIT(0) |
|
#define | LTC6953_PD_MSK(ch) |
|
#define | LTC6953_PD(ch, x) no_os_field_prep(LTC6953_PD_MSK(ch), x) |
|
#define | LTC6953_TEMPO_MSK NO_OS_BIT(7) |
|
#define | LTC6953_EZMD_MSK NO_OS_BIT(4) |
|
#define | LTC6953_SRQMD_MSK NO_OS_BIT(3) |
|
#define | LTC6953_SYSCT_MSK NO_OS_GENMASK(2, 1) |
|
#define | LTC6953_SSRQ_MSK NO_OS_BIT(0) |
|
#define | LTC6953_MP_MSK NO_OS_GENMASK(7, 3) |
|
#define | LTC6953_MD_MSK NO_OS_GENMASK(2, 0) |
|
#define | LTC6953_SRQEN_MSK NO_OS_BIT(7) |
|
#define | LTC6953_MODE_MSK NO_OS_GENMASK(6, 5) |
|
#define | LTC6953_OINV_MSK NO_OS_BIT(4) |
|
#define | LTC6953_DDEL_HIGH_MSK NO_OS_GENMASK(3, 0) |
|
#define | LTC6953_DDEL_LOW_MSK NO_OS_GENMASK(7, 0) |
|
#define | LTC6953_ADEL_MSK NO_OS_GENMASK(5, 0) |
|
#define | LTC6953_REV_MSK NO_OS_GENMASK(7, 4) |
|
#define | LTC6953_PART_MSK NO_OS_GENMASK(3, 0) |
|
#define | LTC6953_NUM_CHAN 11 |
|
#define | LTC6953_OUT_DIV_MIN 1 |
|
#define | LTC6953_OUT_DIV_MAX 1048576 |
|
#define | LTC6953_X_MAX 127 |
|
#define | LTC6953_ADDRX 0 |
|
#define | LTC6953_DXMSB 1 |
|
#define | LTC6953_NUMBITS 2 |
|
#define | LTC6953_R_ONLY 3 |
|
#define | LTC6953_SPI_WRITE_CMD 0x00 |
|
#define | LTC6953_SPI_READ_CMD 0x01 |
|
#define | LTC6953_SPI_ADDR_CMD(x) ((x) << 1) |
|
#define | LTC6953_BUFF_SIZE_BYTES 2 |
|
#define | LTC6953_DUMMY_BYTES 0x00 |
|
|
int | ltc6953_init (struct ltc6953_dev **dev, struct ltc6953_init_param *init_param) |
| Initializes the SPI communication with LTC6953. More...
|
|
int | ltc6953_remove (struct ltc6953_dev *dev) |
| Free resources allocated for LTC6953. More...
|
|
int | ltc6953_reset (struct ltc6953_dev *dev) |
| Software reset of the device. More...
|
|
int | ltc6953_write (struct ltc6953_dev *dev, uint8_t addr, uint16_t data) |
| Writes data to LTC6953 over SPI. More...
|
|
int | ltc6953_read (struct ltc6953_dev *dev, uint8_t addr, uint8_t *data) |
| Read device register. More...
|
|
int | ltc6953_update (struct ltc6953_dev *dev, uint8_t reg_addr, uint8_t mask, uint8_t data) |
| Update LTC6953 register. More...
|
|
int | ltc6953_power_down_all (struct ltc6953_dev *dev, bool is_pwdn) |
| Powers down all LTC6953 output channels. More...
|
|
int | ltc6953_enable_filter (struct ltc6953_dev *dev, bool is_en) |
| Enable LTC6953 VCO Input filter. More...
|
|
int | ltc6953_power_down_vco (struct ltc6953_dev *dev, bool is_pwdn) |
| Powers down LTC6953 VCO Input channel. More...
|
|
int | ltc6953_set_output_divider (struct ltc6953_dev *dev, uint32_t channel, uint32_t divider) |
| Set output divider for LTC6953 output channel. More...
|
|
int | ltc6953_power_mode (struct ltc6953_dev *dev, uint32_t channel, int32_t mode) |
| Set LTC6953 Channel Power Mode. More...
|
|
int | ltc6953_enable_sync (struct ltc6953_dev *dev, uint32_t channel, bool enable) |
| Set LTC6953 Channel Sync mode. More...
|
|
int | ltc6953_set_digital_delay (struct ltc6953_dev *dev, uint32_t channel, uint16_t delay) |
| Set digital delay/phase of LTC6953 output channel. More...
|
|
int | ltc6953_set_analog_delay (struct ltc6953_dev *dev, uint32_t channel, uint16_t delay) |
| Set analog delay/phase of LTC6953 output channel. More...
|
|
int | ltc6953_set_mode (struct ltc6953_dev *dev, uint32_t channel, uint8_t mode) |
| Set LTC6953 output channel mode. More...
|
|
int | ltc6953_invert_output (struct ltc6953_dev *dev, uint32_t channel, bool is_invert) |
| Set LTC6953 output channel inversion. More...
|
|
int | ltc6953_ezsync_mode (struct ltc6953_dev *dev, bool is_en) |
| Set LTC6953 EZSYNC mode. More...
|
|
int | ltc6953_sync_mode (struct ltc6953_dev *dev, bool is_en) |
| Set LTC6953 SRQ mode. More...
|
|
int | ltc6953_ssrq_mode (struct ltc6953_dev *dev, bool is_en) |
| Set LTC6953 SSRQ mode. More...
|
|
int | ltc6953_num_pulse (struct ltc6953_dev *dev, uint8_t num_pulse) |
| Set LTC6953 SYSCT/Num pulse value. More...
|
|
int | ltc6953_enable_temp_stat (struct ltc6953_dev *dev, bool is_en) |
| Set LTC6953 TEMPO value. More...
|
|
int | ltc6953_vco_status (struct ltc6953_dev *dev, bool *is_ok) |
| Read LTC6953 Check VCO Input stats. More...
|
|
int | ltc6953_get_invstat (struct ltc6953_dev *dev, bool *status) |
| Read LTC6953 INVSTAT bit. More...
|
|
int | ltc6953_set_invstat (struct ltc6953_dev *dev, bool status) |
| Write LTC6953 INVSTAT bit. More...
|
|
int | ltc6953_set_x (struct ltc6953_dev *dev, uint8_t x) |
| Set LTC6953 x bitfield status. More...
|
|
int | ltc6953_get_x (struct ltc6953_dev *dev, uint8_t *x) |
| Set LTC6953 x bitfield status. More...
|
|
int | ltc6953_read_rev (struct ltc6953_dev *dev, uint8_t *rev) |
| Read LTC6953 Part number. More...
|
|
int | ltc6953_read_part (struct ltc6953_dev *dev, uint8_t *part) |
| Read LTC6953 Part number. More...
|
|
Implementation of LTC6953 Driver.
- Author
- MTinaco (marie.nosp@m.l.ti.nosp@m.naco@.nosp@m.anal.nosp@m.og.co.nosp@m.m)
Copyright 2023-2024(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.