Go to the documentation of this file.
50 #define CMD_WR_RDAC_EEPROM 1
52 #define CMD_SHUT_DOWN 3
55 #define CMD_RD_EEPROM 6
57 #define SHUT_DOWN_OFF 0
58 #define SHUT_DOWN_ON 1
60 #define WIPER_POSITION 0
61 #define RESISTOR_TOLERANCE 1
struct no_os_i2c_desc * i2c_desc
Definition: ad5110.h:68
int32_t no_os_i2c_write(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Write data to slave device.
Definition: no_os_i2c.c:159
int32_t no_os_i2c_init(struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param)
Initialize the I2C communication peripheral.
Definition: no_os_i2c.c:52
void ad5110_write_rdac(struct ad5110_dev *dev, uint8_t rdac_value)
Write the content of serial register data to RDAC.
Definition: ad5110.c:96
uint8_t ad5110_dev_addr
Definition: ad5110.h:77
uint8_t ad5110_read_rdac(struct ad5110_dev *dev)
Read the content of RDAC register.
Definition: ad5110.c:116
#define CMD_RESET
Definition: ad5110.h:53
void ad5110_shut_down(struct ad5110_dev *dev, uint8_t value)
Software shutdown.
Definition: ad5110.c:240
int32_t no_os_i2c_remove(struct no_os_i2c_desc *desc)
Free the resources allocated by no_os_i2c_init().
Definition: no_os_i2c.c:113
#define CMD_SHUT_DOWN
Definition: ad5110.h:52
uint8_t ad5110_dev_addr
Definition: ad5110.h:70
int32_t ad5110_remove(struct ad5110_dev *dev)
Free the resources allocated by ad5110_init().
Definition: ad5110.c:77
#define CMD_WR_RDAC
Definition: ad5110.h:51
uint8_t ad5110_read_wiper(struct ad5110_dev *dev)
Read wiper position from EEPROM.
Definition: ad5110.c:163
Definition: ad9361_util.h:69
uint8_t ad5110_read_rdac(struct ad5110_dev *dev)
Read the content of RDAC register.
Definition: ad5110.c:116
int8_t ad5110_init(struct ad5110_dev **device, struct ad5110_init_param init_param)
Initializes the communication with the device.
Definition: ad5110.c:52
struct no_os_i2c_init_param i2c_init
Definition: ad5110.h:75
uint8_t ad5110_read_wiper(struct ad5110_dev *dev)
Read wiper position from EEPROM.
Definition: ad5110.c:163
#define CMD_RD_EEPROM
Definition: ad5110.h:55
void ad5110_write_rdac_eeprom(struct ad5110_dev *dev)
Write the content of RDAC register to EEPROM.
Definition: ad5110.c:143
#define CMD_WR_RDAC_EEPROM
Definition: ad5110.h:50
void ad5110_shut_down(struct ad5110_dev *dev, uint8_t value)
Software shutdown.
Definition: ad5110.c:240
int32_t ad5110_remove(struct ad5110_dev *dev)
Free the resources allocated by ad5110_init().
Definition: ad5110.c:77
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
int32_t no_os_i2c_read(struct no_os_i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit)
I2C Read data from slave device.
Definition: no_os_i2c.c:190
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
void ad5110_write_rdac_eeprom(struct ad5110_dev *dev)
Write the content of RDAC register to EEPROM.
Definition: ad5110.c:143
Header file of I2C Interface.
#define RESISTOR_TOLERANCE
Definition: ad5110.h:61
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
void ad5110_reset(struct ad5110_dev *dev)
Software reset; makes a refresh of RDAC register with EEPROM.
Definition: ad5110.c:217
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
uint8_t ad5110_read_res_tolerance(struct ad5110_dev *dev)
Read resistor tolerance from EEPROM.
Definition: ad5110.c:190
#define WIPER_POSITION
Definition: ad5110.h:60
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
Header file of ad5110 Driver for Microblaze processor.
uint8_t ad5110_read_res_tolerance(struct ad5110_dev *dev)
Read resistor tolerance from EEPROM.
Definition: ad5110.c:190
int8_t ad5110_init(struct ad5110_dev **device, struct ad5110_init_param init_param)
Initializes the communication with the device.
Definition: ad5110.c:52
#define CMD_RD_RDAC
Definition: ad5110.h:54
void ad5110_reset(struct ad5110_dev *dev)
Software reset; makes a refresh of RDAC register with EEPROM.
Definition: ad5110.c:217
void ad5110_write_rdac(struct ad5110_dev *dev, uint8_t rdac_value)
Write the content of serial register data to RDAC.
Definition: ad5110.c:96