42#define AD5142_NUM_POTENTIOMETER_CH 2
44#define AD5142_NUM_LINEAR_GAIN_CH 4
const struct dpot_ops ad5142_dpot_ops
Definition ad5142.c:862
#define AD5142_NUM_POTENTIOMETER_CH
Definition ad5142.h:42
int ad5142_dpot_input_reg_write(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t data)
Write to the digital potentiometer input register.
Definition ad5142.c:469
int ad5142_dpot_chn_read(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t *data)
Read the AD5142 digital potentiometer channel.
Definition ad5142.c:534
int ad5142_dpot_rdac_linear_update(struct dpot_dev *desc, enum dpot_chn_type chn, enum dpot_rdac_linear_status status)
Perform RDAC linear increment/decrement.
Definition ad5142.c:737
int ad5142_dpot_rdac_6db_update(struct dpot_dev *desc, enum dpot_chn_type chn, enum dpot_rdac_6db_status status)
Perform RDAC 6dB increment/decrement.
Definition ad5142.c:773
int ad5142_dpot_remove(struct dpot_dev *desc)
Free the memory allocated by ad5142_dpot_init().
Definition ad5142.c:257
int ad5142_dpot_set_operating_mode(struct dpot_dev *desc, enum dpot_operating_mode operating_mode)
Set the AD5142 digital potentiometer operating mode.
Definition ad5142.c:382
#define AD5142_NUM_LINEAR_GAIN_CH
Definition ad5142.h:44
int ad5142_dpot_nvm_write(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t data)
Write data to NVM (non-volatile) memory.
Definition ad5142.c:637
int ad5142_dpot_nvm_read(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t *data)
Read the NVM (non-volatile) memory data.
Definition ad5142.c:602
int ad5142_dpot_shutdown(struct dpot_dev *desc, enum dpot_chn_type chn, bool shutdown_enable)
Shutdown the AD5142 digital potentiometer channel.
Definition ad5142.c:342
int ad5142_dpot_copy_nvm_to_rdac(struct dpot_dev *desc, enum dpot_chn_type chn)
Copy NVM/EEPROM data to RDAC.
Definition ad5142.c:705
int ad5142_dpot_send_cmd(struct dpot_dev *desc, struct dpot_command *cmd)
Send command word to the AD5142 digital potentiometer.
Definition ad5142.c:807
int ad5142_dpot_reset(struct dpot_dev *desc)
Reset the AD5142 digital potentiometer.
Definition ad5142.c:289
int ad5142_dpot_init(struct dpot_init_param *init_params, struct dpot_dev **desc)
Initialize the AD5142 digital potentiometer.
Definition ad5142.c:152
int ad5142_dpot_copy_rdac_to_nvm(struct dpot_dev *desc, enum dpot_chn_type chn)
Copy RDAC register to NVM/EEPROM.
Definition ad5142.c:671
int ad5142_dpot_input_reg_read(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t *data)
Read the AD5142 digital potentiometer input register.
Definition ad5142.c:434
int ad5142_dpot_chn_write(struct dpot_dev *desc, enum dpot_chn_type chn, uint8_t data)
Write to the digital potentiometer channel.
Definition ad5142.c:569
int ad5142_dpot_sw_lrdac_update(struct dpot_dev *desc, enum dpot_chn_type chn)
Copy input register to RDAC (software LRDAC).
Definition ad5142.c:502
dpot_operating_mode
Digital potentiometer operating mode.
Definition dpot.h:106
dpot_rdac_linear_status
Digital potentiometer RDAC linear update status.
Definition dpot.h:118
dpot_rdac_6db_status
Digital potentiometer RDAC 6dB update status.
Definition dpot.h:130
dpot_chn_type
Digital potentiometer channel type.
Definition dpot.h:81
dpot_intf_type
digital potentiometer interface type.
Definition dpot.h:72
Header file of GPIO Interface.
Header file of I2C Interface.
Header file of SPI Interface.
Header file of utility functions.
AD5142 digital potentiometer device descriptor parameters.
Definition ad5142.h:80
struct no_os_i2c_desc * i2c_desc
Definition ad5142.h:85
bool shutdown_enable[4]
Definition ad5142.h:91
enum dpot_intf_type intf_type
Definition ad5142.h:81
struct no_os_spi_desc * spi_desc
Definition ad5142.h:83
struct no_os_gpio_desc * indep_gpio_desc
Definition ad5142.h:89
struct no_os_gpio_desc * reset_gpio_desc
Definition ad5142.h:87
enum dpot_operating_mode operating_mode
Definition ad5142.h:93
AD5142 digital potentiometer init parameters.
Definition ad5142.h:51
struct no_os_spi_init_param * spi_init
Definition ad5142.h:55
bool shutdown_enable_pt[AD5142_NUM_POTENTIOMETER_CH]
Definition ad5142.h:69
struct no_os_gpio_init_param * lrdac_gpio_init
Definition ad5142.h:63
bool shutdown_enable_lg[AD5142_NUM_LINEAR_GAIN_CH]
Definition ad5142.h:71
struct no_os_gpio_init_param * wp_gpio_init
Definition ad5142.h:65
enum dpot_operating_mode eoperating_mode
Definition ad5142.h:73
struct no_os_gpio_init_param * indep_gpio_init
Definition ad5142.h:67
enum dpot_intf_type eintf_type
Definition ad5142.h:53
struct no_os_i2c_init_param * i2c_init
Definition ad5142.h:57
struct no_os_gpio_init_param * dis_gpio_init
Definition ad5142.h:61
struct no_os_gpio_init_param * reset_gpio_init
Definition ad5142.h:59
Digital potentiometer command structure.
Definition dpot.h:141
Digital potentiometer device descriptor parameters.
Definition dpot.h:175
Digital potentiometer init parameters.
Definition dpot.h:157
Digital potentiometer common APIs.
Definition dpot.h:188
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Structure holding I2C address descriptor.
Definition no_os_i2c.h:89
Structure holding the parameters for I2C initialization.
Definition no_os_i2c.h:52
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128