no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ad5110.h
Go to the documentation of this file.
1/**************************************************************************/
33#ifndef _ad5110_H_
34#define _ad5110_H_
35
36#include <stdint.h>
37#include "no_os_i2c.h"
38
40#define COMMAND 8
42#define CMD_NOP 0
43#define CMD_WR_RDAC_EEPROM 1
44#define CMD_WR_RDAC 2
45#define CMD_SHUT_DOWN 3
46#define CMD_RESET 4
47#define CMD_RD_RDAC 5
48#define CMD_RD_EEPROM 6
50#define SHUT_DOWN_OFF 0
51#define SHUT_DOWN_ON 1
53#define WIPER_POSITION 0
54#define RESISTOR_TOLERANCE 1
55
56struct ad5110_dev {
57 /* I2C */
59 /* Device Settings */
61};
62
64 /* I2C */
66 /* Device Settings */
68};
69
71int8_t ad5110_init(struct ad5110_dev **device,
73
75int32_t ad5110_remove(struct ad5110_dev *dev);
76
78void ad5110_write_rdac(struct ad5110_dev *dev,
79 uint8_t rdac_value);
80
82uint8_t ad5110_read_rdac(struct ad5110_dev *dev);
83
85void ad5110_write_rdac_eeprom(struct ad5110_dev *dev);
86
88uint8_t ad5110_read_wiper(struct ad5110_dev *dev);
89
91uint8_t ad5110_read_res_tolerance(struct ad5110_dev *dev);
92
94void ad5110_reset(struct ad5110_dev *dev);
95
97void ad5110_shut_down(struct ad5110_dev *dev,
98 uint8_t value);
99
100#endif // _ad5110_H_
int8_t ad5110_init(struct ad5110_dev **device, struct ad5110_init_param init_param)
Initializes the communication with the device.
Definition ad5110.c:49
void ad5110_reset(struct ad5110_dev *dev)
Software reset; makes a refresh of RDAC register with EEPROM.
Definition ad5110.c:208
void ad5110_write_rdac(struct ad5110_dev *dev, uint8_t rdac_value)
Write the content of serial register data to RDAC.
Definition ad5110.c:91
uint8_t ad5110_read_rdac(struct ad5110_dev *dev)
Read the content of RDAC register.
Definition ad5110.c:111
void ad5110_write_rdac_eeprom(struct ad5110_dev *dev)
Write the content of RDAC register to EEPROM.
Definition ad5110.c:136
int32_t ad5110_remove(struct ad5110_dev *dev)
Free the resources allocated by ad5110_init().
Definition ad5110.c:74
uint8_t ad5110_read_res_tolerance(struct ad5110_dev *dev)
Read resistor tolerance from EEPROM.
Definition ad5110.c:183
void ad5110_shut_down(struct ad5110_dev *dev, uint8_t value)
Software shutdown.
Definition ad5110.c:229
uint8_t ad5110_read_wiper(struct ad5110_dev *dev)
Read wiper position from EEPROM.
Definition ad5110.c:156
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
Header file of I2C Interface.
Definition ad5110.h:56
struct no_os_i2c_desc * i2c_desc
Definition ad5110.h:58
uint8_t ad5110_dev_addr
Definition ad5110.h:60
Definition ad5110.h:63
struct no_os_i2c_init_param i2c_init
Definition ad5110.h:65
uint8_t ad5110_dev_addr
Definition ad5110.h:67
Definition ad9361_util.h:63
Structure holding I2C address descriptor.
Definition no_os_i2c.h:89
Structure holding the parameters for I2C initialization.
Definition no_os_i2c.h:52