46#define CMD_SDO_Z 0x8001
49#define CALI_MSK NO_OS_BIT(2)
50#define PROTECT_MSK NO_OS_BIT(1)
83#define AD5293_W_CTRL_FRAME(pm,cali) (uint16_t)((CMD_W_CTRL<<10)|(pm<<1)|(cali<<2))
84#define AD5293_R_CTRL_FRAME (uint16_t)CMD_R_CTRL<<10
85#define AD5293_W_WIPER_FRAME(data) (uint16_t)((CMD_W_WIPER<<10)|data)
86#define AD5293_R_WIPER_FRAME (uint16_t)CMD_R_WIPER<<10
87#define SHUTDOWN_FRAME(sd) (uint16_t)((CMD_PD<<10)|sd)
88#define RESET_FRAME (uint16_t)CMD_RESET<<10
int32_t ad5293_remove(struct ad5293_dev *dev)
Free any resource used by the driver.
Definition ad5293.c:152
int32_t ad5293_read_reg_cali(struct ad5293_dev *dev)
Read ad5293 device register calibration mode through SPI interface.
Definition ad5293.c:447
int8_t ad5293_get_cali(struct ad5293_dev *dev, uint8_t num)
Get calibration of a certain chip.
Definition ad5293.c:526
operation_mode_t
Definition ad5293.h:71
@ BUS
Definition ad5293.h:72
@ DAISY_CHAIN
Definition ad5293.h:73
int32_t ad5293_init(struct ad5293_dev **device, struct ad5293_init_param *init_param)
Initialize the ad5293 device structure.
Definition ad5293.c:71
int32_t ad5293_write_cali(struct ad5293_dev *dev)
Write ad5293 chip info struct calibration value through SPI interface.
Definition ad5293.c:379
int16_t ad5293_get_wiper(struct ad5293_dev *dev, uint8_t num)
Get wiper of a certain chip.
Definition ad5293.c:546
int32_t ad5293_update_cali(struct ad5293_dev *dev, enum calibration_mode_t cali, uint8_t num)
Update ad5293 chip info struct calibration information.
Definition ad5293.c:313
int32_t ad5293_soft_reset(struct ad5293_dev *dev)
Reset ad5293 through software reset command.
Definition ad5293.c:216
calibration_mode_t
Definition ad5293.h:53
@ CALI_PERFORMANCE
Definition ad5293.h:54
@ CALI_NORMAL
Definition ad5293.h:55
shutdown_t
Definition ad5293.h:65
@ SHUTDOWN
Definition ad5293.h:67
protect_mode_t
Definition ad5293.h:59
@ PROTECT_UNLOCK
Definition ad5293.h:61
@ PROTECT_LOCK
Definition ad5293.h:60
int32_t ad5293_sdo_setfloat(struct ad5293_dev *dev)
Place SDO pin in high impedence mode.
Definition ad5293.c:251
int32_t ad5293_write_wiper(struct ad5293_dev *dev)
Write ad5293 chip info struct wiper value through SPI interface.
Definition ad5293.c:408
int32_t ad5293_update_wiper(struct ad5293_dev *dev, uint16_t val, uint8_t num)
Update ad5293 chip info struct wiper value information.
Definition ad5293.c:338
int32_t ad5293_hard_reset(struct ad5293_dev *dev)
Reset ad5293 through Hardware Reset Pin.
Definition ad5293.c:182
int32_t ad5293_shutdown(struct ad5293_dev *dev, enum shutdown_t sd)
Place ad5293 in shutdown mode or recovery.
Definition ad5293.c:285
sdo_mode_t
Definition ad5293.h:77
@ SDO_ENABLE
Definition ad5293.h:79
@ SDO_DISENABLE
Definition ad5293.h:78
int32_t ad5293_read_reg_wiper(struct ad5293_dev *dev)
Read ad5293 device register wiper value through SPI interface.
Definition ad5293.c:487
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
@ NORMAL
Definition ade9153a.h:443
Header file of GPIO Interface.
Header file of SPI Interface.
Header file of utility functions.
enum calibration_mode_t cali
Definition ad5293.h:92
uint16_t Wiper_value
Definition ad5293.h:93
uint16_t chip_num
Definition ad5293.h:102
struct no_os_spi_desc * spi_desc
Definition ad5293.h:98
struct no_os_gpio_desc * gpio_reset
Definition ad5293.h:100
struct ad5293_chip_info * chip
Definition ad5293.h:104
struct no_os_gpio_init_param * gpio_reset
Definition ad5293.h:111
uint16_t chip_num
Definition ad5293.h:113
struct no_os_spi_init_param spi_init
Definition ad5293.h:109
Definition ad9361_util.h:63
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 SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128