no-OS
ad7746.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef _AD7746_H_
35 #define _AD7746_H_
36 
37 #include <stdint.h>
38 #include <stdbool.h>
39 #include "no_os_util.h"
40 #include "no_os_i2c.h"
41 
42 /* AD7746 Slave Address */
43 #define AD7746_ADDRESS 0x48
44 
45 /* AD7746 Reset command */
46 #define AD7746_RESET_CMD 0xBF
47 
48 /* AD7746 Register Definition */
49 #define AD7746_REG_STATUS 0u
50 #define AD7746_REG_CAP_DATA_HIGH 1u
51 #define AD7746_REG_CAP_DATA_MID 2u
52 #define AD7746_REG_CAP_DATA_LOW 3u
53 #define AD7746_REG_VT_DATA_HIGH 4u
54 #define AD7746_REG_VT_DATA_MID 5u
55 #define AD7746_REG_VT_DATA_LOW 6u
56 #define AD7746_REG_CAP_SETUP 7u
57 #define AD7746_REG_VT_SETUP 8u
58 #define AD7746_REG_EXC_SETUP 9u
59 #define AD7746_REG_CFG 10u
60 #define AD7746_REG_CAPDACA 11u
61 #define AD7746_REG_CAPDACB 12u
62 #define AD7746_REG_CAP_OFFH 13u
63 #define AD7746_REG_CAP_OFFL 14u
64 #define AD7746_REG_CAP_GAINH 15u
65 #define AD7746_REG_CAP_GAINL 16u
66 #define AD7746_REG_VOLT_GAINH 17u
67 #define AD7746_REG_VOLT_GAINL 18u
68 
69 #define AD7746_NUM_REGISTERS (AD7746_REG_VOLT_GAINL + 1u)
70 
71 /* AD7746_REG_STATUS bits */
72 #define AD7746_STATUS_EXCERR_MSK NO_OS_BIT(3)
73 #define AD7746_STATUS_RDY_MSK NO_OS_BIT(2)
74 #define AD7746_STATUS_RDYVT_MSK NO_OS_BIT(1)
75 #define AD7746_STATUS_RDYCAP_MSK NO_OS_BIT(0)
76 
77 /* AD7746_REG_CAP_SETUP bits */
78 #define AD7746_CAPSETUP_CAPEN_MSK NO_OS_BIT(7)
79 #define AD7746_CAPSETUP_CIN2_MSK NO_OS_BIT(6)
80 #define AD7746_CAPSETUP_CAPDIFF_MSK NO_OS_BIT(5)
81 #define AD7746_CAPSETUP_CAPCHOP_MSK NO_OS_BIT(0)
82 
83 /* AD7746_REG_VT_SETUP bits */
84 #define AD7746_VTSETUP_VTEN_MSK NO_OS_BIT(7)
85 #define AD7746_VTSETUP_VTMD_MSK NO_OS_GENMASK(6,5)
86 #define AD7746_VTSETUP_EXTREF_MSK NO_OS_BIT(4)
87 #define AD7746_VTSETUP_VTSHORT_MSK NO_OS_BIT(1)
88 #define AD7746_VTSETUP_VTCHOP_MSK NO_OS_BIT(0)
89 
90 /* AD7746_REG_EXC_SETUP bits */
91 #define AD7746_EXCSETUP_CLKCTRL_MSK NO_OS_BIT(7)
92 #define AD7746_EXCSETUP_EXCON_MSK NO_OS_BIT(6)
93 #define AD7746_EXCSETUP_EXCB_MSK NO_OS_GENMASK(5,4)
94 #define AD7746_EXCSETUP_EXCA_MSK NO_OS_GENMASK(3,2)
95 #define AD7746_EXCSETUP_EXCLVL_MSK NO_OS_GENMASK(1,0)
96 
97 /* AD7746_REG_CFG bits */
98 #define AD7746_CONF_VTF_MSK NO_OS_GENMASK(7,6)
99 #define AD7746_CONF_CAPF_MSK NO_OS_GENMASK(5,3)
100 #define AD7746_CONF_MD_MSK NO_OS_GENMASK(2,0)
101 
102 /* AD7746_REG_CAPDACx bits */
103 #define AD7746_CAPDAC_DACEN_MSK NO_OS_BIT(7)
104 #define AD7746_CAPDAC_DACP_MSK NO_OS_GENMASK(6,0)
105 
106 enum ad7746_id {
110 };
111 
112 struct ad7746_cap {
113  bool capen;
114  bool cin2;
115  bool capdiff;
116  bool capchop;
117 };
118 
124 };
125 
126 struct ad7746_vt {
127  bool vten;
129  bool extref;
130  bool vtshort;
131  bool vtchop;
132 };
133 
138 };
139 
145 };
146 
147 struct ad7746_exc {
148  bool clkctrl;
149  bool excon;
153 };
154 
155 enum ad7746_md {
162 };
163 
165  uint8_t vtf;
166  uint8_t capf;
167  enum ad7746_md md;
168 };
169 
170 struct ad7746_setup {
171  struct ad7746_cap cap;
172  struct ad7746_vt vt;
173  struct ad7746_exc exc;
175 };
176 
179  enum ad7746_id id;
181 };
182 
183 struct ad7746_dev {
185  enum ad7746_id id;
186  uint8_t buf[AD7746_NUM_REGISTERS + 1u];
188 };
189 
190 int32_t ad7746_init(struct ad7746_dev **device,
191  struct ad7746_init_param *init_param);
192 int32_t ad7746_reg_write(struct ad7746_dev *dev, uint8_t reg,
193  uint8_t* data, uint16_t bytes_number);
194 int32_t ad7746_reg_read(struct ad7746_dev *dev, uint8_t reg,
195  uint8_t* data, uint16_t bytes_number);
196 int32_t ad7746_reset(struct ad7746_dev *dev);
197 int32_t ad7746_remove(struct ad7746_dev *dev);
198 int32_t ad7746_set_cap(struct ad7746_dev *dev, struct ad7746_cap cap);
199 int32_t ad7746_set_vt(struct ad7746_dev *dev, struct ad7746_vt vt);
200 int32_t ad7746_set_exc(struct ad7746_dev *dev, struct ad7746_exc exc);
201 int32_t ad7746_set_config(struct ad7746_dev *dev, struct ad7746_config config);
202 int32_t ad7746_set_cap_dac_a(struct ad7746_dev *dev, bool enable, uint8_t code);
203 int32_t ad7746_set_cap_dac_b(struct ad7746_dev *dev, bool enable, uint8_t code);
204 int32_t ad7746_set_cap_offset(struct ad7746_dev *dev, uint16_t offset);
205 int32_t ad7746_set_cap_gain(struct ad7746_dev *dev, uint16_t gain);
206 int32_t ad7746_set_volt_gain(struct ad7746_dev *dev, uint16_t gain);
207 int32_t ad7746_get_vt_data(struct ad7746_dev *dev, uint32_t *vt_data);
208 int32_t ad7746_get_cap_data(struct ad7746_dev *dev, uint32_t *cap_data);
209 int32_t ad7746_calibrate(struct ad7746_dev *dev, enum ad7746_md md);
210 
211 #endif // _AD7746_H
AD7746_CONF_CAPF_MSK
#define AD7746_CONF_CAPF_MSK
Definition: ad7746.h:99
AD7746_VTSETUP_VTMD_MSK
#define AD7746_VTSETUP_VTMD_MSK
Definition: ad7746.h:85
AD7746_STATUS_RDYCAP_MSK
#define AD7746_STATUS_RDYCAP_MSK
Definition: ad7746.h:75
ad7746_cap::cin2
bool cin2
Definition: ad7746.h:114
timeout
uint32_t timeout
Definition: ad413x.c:49
AD7746_REG_CAP_GAINH
#define AD7746_REG_CAP_GAINH
Definition: ad7746.h:64
no_os_alloc.h
ad7746_set_cap_dac_a
int32_t ad7746_set_cap_dac_a(struct ad7746_dev *dev, bool enable, uint8_t code)
Set the DAC code and enable state for EXCA.
Definition: ad7746.c:333
no_os_i2c_write
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
no_os_i2c_init
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
ad7746_set_cap_dac_b
int32_t ad7746_set_cap_dac_b(struct ad7746_dev *dev, bool enable, uint8_t code)
Set the DAC code and enable state for EXCB.
Definition: ad7746.c:357
ad7746_init
int32_t ad7746_init(struct ad7746_dev **device, struct ad7746_init_param *init_param)
Initialize the ad7606 device structure.
Definition: ad7746.c:53
ad7746_set_exc
int32_t ad7746_set_exc(struct ad7746_dev *dev, struct ad7746_exc exc)
Configure the excitation setup register.
Definition: ad7746.c:268
AD7746_EXCLVL_2_DIV_8
@ AD7746_EXCLVL_2_DIV_8
Definition: ad7746.h:142
ad7746_cap
Definition: ad7746.h:112
ad7746_reg_write
int32_t ad7746_reg_write(struct ad7746_dev *dev, uint8_t reg, uint8_t *data, uint16_t bytes_number)
Writes data into AD7746 registers, starting from the selected register address pointer.
Definition: ad7746.c:115
ad7746_vt::extref
bool extref
Definition: ad7746.h:129
ad7746_vt::vtshort
bool vtshort
Definition: ad7746.h:130
ad7746_set_cap_offset
int32_t ad7746_set_cap_offset(struct ad7746_dev *dev, uint16_t offset)
Set the capacitive offset.
Definition: ad7746.c:394
ad7746_remove
int32_t ad7746_remove(struct ad7746_dev *dev)
Deinitialize the ad7746 driver and free all allocated resources.
Definition: ad7746.c:181
AD7746_CAPSETUP_CAPCHOP_MSK
#define AD7746_CAPSETUP_CAPCHOP_MSK
Definition: ad7746.h:81
AD7746_REG_CFG
#define AD7746_REG_CFG
Definition: ad7746.h:59
AD7746_CAPDAC_DACEN_MSK
#define AD7746_CAPDAC_DACEN_MSK
Definition: ad7746.h:103
AD7746_VTSETUP_VTCHOP_MSK
#define AD7746_VTSETUP_VTCHOP_MSK
Definition: ad7746.h:88
no_os_i2c_remove
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
AD7746_EXCLVL_3_DIV_8
@ AD7746_EXCLVL_3_DIV_8
Definition: ad7746.h:143
AD7746_CONF_MD_MSK
#define AD7746_CONF_MD_MSK
Definition: ad7746.h:100
ad7746_remove
int32_t ad7746_remove(struct ad7746_dev *dev)
Deinitialize the ad7746 driver and free all allocated resources.
Definition: ad7746.c:181
ad7746_exc_pin
ad7746_exc_pin
Definition: ad7746.h:134
AD7746_VIN_EXT_VIN
@ AD7746_VIN_EXT_VIN
Definition: ad7746.h:123
AD7746_REG_CAP_SETUP
#define AD7746_REG_CAP_SETUP
Definition: ad7746.h:56
no_os_delay.h
Header file of Delay functions.
ad7746_dev::setup
struct ad7746_setup setup
Definition: ad7746.h:187
ad7746_set_cap_dac_a
int32_t ad7746_set_cap_dac_a(struct ad7746_dev *dev, bool enable, uint8_t code)
Set the DAC code and enable state for EXCA.
Definition: ad7746.c:333
ad7746_exc::excb
enum ad7746_exc_pin excb
Definition: ad7746.h:150
ad7746_vtmd
ad7746_vtmd
Definition: ad7746.h:119
device
Definition: ad9361_util.h:69
AD7746_EXCLVL_1_DIV_8
@ AD7746_EXCLVL_1_DIV_8
Definition: ad7746.h:141
ad7746_get_vt_data
int32_t ad7746_get_vt_data(struct ad7746_dev *dev, uint32_t *vt_data)
Waits until a conversion on a voltage/temperature channel has been finished and returns the output da...
Definition: ad7746.c:441
AD7746_EXC_PIN_DISABLED
@ AD7746_EXC_PIN_DISABLED
Definition: ad7746.h:135
AD7746_MODE_GAIN_CALIB
@ AD7746_MODE_GAIN_CALIB
Definition: ad7746.h:161
AD7746_MODE_POWERDOWN
@ AD7746_MODE_POWERDOWN
Definition: ad7746.h:159
ad7746_reset
int32_t ad7746_reset(struct ad7746_dev *dev)
Resets the AD7746.
Definition: ad7746.c:165
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
ad7746_exclvl
ad7746_exclvl
Definition: ad7746.h:140
ad7746_exc::exca
enum ad7746_exc_pin exca
Definition: ad7746.h:151
ad7746_set_cap
int32_t ad7746_set_cap(struct ad7746_dev *dev, struct ad7746_cap cap)
Configure the capacitive setup register.
Definition: ad7746.c:203
AD7746_MODE_CONT
@ AD7746_MODE_CONT
Definition: ad7746.h:157
AD7746_VTSETUP_VTEN_MSK
#define AD7746_VTSETUP_VTEN_MSK
Definition: ad7746.h:84
ad7746_get_vt_data
int32_t ad7746_get_vt_data(struct ad7746_dev *dev, uint32_t *vt_data)
Waits until a conversion on a voltage/temperature channel has been finished and returns the output da...
Definition: ad7746.c:441
ad7746_cap::capen
bool capen
Definition: ad7746.h:113
AD7746_VTSETUP_VTSHORT_MSK
#define AD7746_VTSETUP_VTSHORT_MSK
Definition: ad7746.h:87
ad7746_dev
Definition: ad7746.h:183
ad7746_exc::excon
bool excon
Definition: ad7746.h:149
ad7746_calibrate
int32_t ad7746_calibrate(struct ad7746_dev *dev, enum ad7746_md md)
Perform offset/gain calibration.
Definition: ad7746.c:524
AD7746_MODE_SINGLE
@ AD7746_MODE_SINGLE
Definition: ad7746.h:158
ad7746_setup
Definition: ad7746.h:170
AD7746_CAPSETUP_CAPEN_MSK
#define AD7746_CAPSETUP_CAPEN_MSK
Definition: ad7746.h:78
ID_AD7746
@ ID_AD7746
Definition: ad7746.h:108
ad7746_exc::clkctrl
bool clkctrl
Definition: ad7746.h:148
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
no_os_field_prep
uint32_t no_os_field_prep(uint32_t mask, uint32_t val)
AD7746_CONF_VTF_MSK
#define AD7746_CONF_VTF_MSK
Definition: ad7746.h:98
AD7746_VTMD_VDD_MON
@ AD7746_VTMD_VDD_MON
Definition: ad7746.h:122
no_os_error.h
Error codes definition.
ad7746.h
Header file of AD7746 Driver.
ad7746_config
Definition: ad7746.h:164
ad7746_init_param::setup
struct ad7746_setup setup
Definition: ad7746.h:180
ad7746_init
int32_t ad7746_init(struct ad7746_dev **device, struct ad7746_init_param *init_param)
Initialize the ad7606 device structure.
Definition: ad7746.c:53
AD7746_MODE_IDLE
@ AD7746_MODE_IDLE
Definition: ad7746.h:156
AD7746_EXCSETUP_EXCA_MSK
#define AD7746_EXCSETUP_EXCA_MSK
Definition: ad7746.h:94
ad7746_set_vt
int32_t ad7746_set_vt(struct ad7746_dev *dev, struct ad7746_vt vt)
Configure the voltage/temperature setup register.
Definition: ad7746.c:235
ad7746_init_param
Definition: ad7746.h:177
ad7746_set_cap_gain
int32_t ad7746_set_cap_gain(struct ad7746_dev *dev, uint16_t gain)
Set the capacitive gain.
Definition: ad7746.c:409
AD7746_EXCSETUP_EXCON_MSK
#define AD7746_EXCSETUP_EXCON_MSK
Definition: ad7746.h:92
AD7746_CAPDAC_DACP_MSK
#define AD7746_CAPDAC_DACP_MSK
Definition: ad7746.h:104
AD7746_REG_CAPDACB
#define AD7746_REG_CAPDACB
Definition: ad7746.h:61
AD7746_REG_VT_DATA_HIGH
#define AD7746_REG_VT_DATA_HIGH
Definition: ad7746.h:53
ad7746_dev::id
enum ad7746_id id
Definition: ad7746.h:185
ad7746_exc::exclvl
enum ad7746_exclvl exclvl
Definition: ad7746.h:152
ad7746_set_cap_gain
int32_t ad7746_set_cap_gain(struct ad7746_dev *dev, uint16_t gain)
Set the capacitive gain.
Definition: ad7746.c:409
ad7746_set_config
int32_t ad7746_set_config(struct ad7746_dev *dev, struct ad7746_config config)
Set the configuration register.
Definition: ad7746.c:301
AD7746_RESET_CMD
#define AD7746_RESET_CMD
Definition: ad7746.h:46
ad7746_vt
Definition: ad7746.h:126
ad7746_setup::exc
struct ad7746_exc exc
Definition: ad7746.h:173
ad7746_setup::config
struct ad7746_config config
Definition: ad7746.h:174
AD7746_REG_VOLT_GAINH
#define AD7746_REG_VOLT_GAINH
Definition: ad7746.h:66
ad7746_set_volt_gain
int32_t ad7746_set_volt_gain(struct ad7746_dev *dev, uint16_t gain)
Set the voltage gain.
Definition: ad7746.c:424
AD7746_REG_CAPDACA
#define AD7746_REG_CAPDACA
Definition: ad7746.h:60
ad7746_id
ad7746_id
Definition: ad7746.h:106
AD7746_VTMD_EXT_TEMP
@ AD7746_VTMD_EXT_TEMP
Definition: ad7746.h:121
AD7746_REG_EXC_SETUP
#define AD7746_REG_EXC_SETUP
Definition: ad7746.h:58
AD7746_CAPSETUP_CAPDIFF_MSK
#define AD7746_CAPSETUP_CAPDIFF_MSK
Definition: ad7746.h:80
ad7746_set_vt
int32_t ad7746_set_vt(struct ad7746_dev *dev, struct ad7746_vt vt)
Configure the voltage/temperature setup register.
Definition: ad7746.c:235
ad7746_set_cap_dac_b
int32_t ad7746_set_cap_dac_b(struct ad7746_dev *dev, bool enable, uint8_t code)
Set the DAC code and enable state for EXCB.
Definition: ad7746.c:357
ad7746_set_volt_gain
int32_t ad7746_set_volt_gain(struct ad7746_dev *dev, uint16_t gain)
Set the voltage gain.
Definition: ad7746.c:424
ad7746_set_exc
int32_t ad7746_set_exc(struct ad7746_dev *dev, struct ad7746_exc exc)
Configure the excitation setup register.
Definition: ad7746.c:268
ad7746_init_param::id
enum ad7746_id id
Definition: ad7746.h:179
ad7746_config::md
enum ad7746_md md
Definition: ad7746.h:167
AD7746_REG_CAP_DATA_HIGH
#define AD7746_REG_CAP_DATA_HIGH
Definition: ad7746.h:50
ad7746_reg_read
int32_t ad7746_reg_read(struct ad7746_dev *dev, uint8_t reg, uint8_t *data, uint16_t bytes_number)
Reads data from AD7746 registers, starting from the selected register address pointer.
Definition: ad7746.c:140
ad7746_reg_write
int32_t ad7746_reg_write(struct ad7746_dev *dev, uint8_t reg, uint8_t *data, uint16_t bytes_number)
Writes data into AD7746 registers, starting from the selected register address pointer.
Definition: ad7746.c:115
ad7746_set_cap_offset
int32_t ad7746_set_cap_offset(struct ad7746_dev *dev, uint16_t offset)
Set the capacitive offset.
Definition: ad7746.c:394
AD7746_EXC_PIN_INVERTED
@ AD7746_EXC_PIN_INVERTED
Definition: ad7746.h:136
no_os_i2c_desc
Structure holding I2C address descriptor.
Definition: no_os_i2c.h:101
ad7746_calibrate
int32_t ad7746_calibrate(struct ad7746_dev *dev, enum ad7746_md md)
Perform offset/gain calibration.
Definition: ad7746.c:524
ad7746_dev::buf
uint8_t buf[AD7746_NUM_REGISTERS+1u]
Definition: ad7746.h:186
no_os_i2c_read
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
ID_AD7747
@ ID_AD7747
Definition: ad7746.h:109
ad7746_reg_read
int32_t ad7746_reg_read(struct ad7746_dev *dev, uint8_t reg, uint8_t *data, uint16_t bytes_number)
Reads data from AD7746 registers, starting from the selected register address pointer.
Definition: ad7746.c:140
no_os_i2c.h
Header file of I2C Interface.
AD7746_REG_VT_SETUP
#define AD7746_REG_VT_SETUP
Definition: ad7746.h:57
AD7746_EXCLVL_4_DIV_8
@ AD7746_EXCLVL_4_DIV_8
Definition: ad7746.h:144
ad7746_cap::capchop
bool capchop
Definition: ad7746.h:116
ad7746_config::capf
uint8_t capf
Definition: ad7746.h:166
ad7746_cap::capdiff
bool capdiff
Definition: ad7746.h:115
ad7746_setup::vt
struct ad7746_vt vt
Definition: ad7746.h:172
no_os_free
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
ad7746_vt::vten
bool vten
Definition: ad7746.h:127
ad7746_config::vtf
uint8_t vtf
Definition: ad7746.h:165
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
no_os_i2c_init_param
Structure holding the parameters for I2C initialization.
Definition: no_os_i2c.h:64
NULL
#define NULL
Definition: wrapper.h:64
AD7746_REG_CAP_OFFH
#define AD7746_REG_CAP_OFFH
Definition: ad7746.h:62
ad7746_exc
Definition: ad7746.h:147
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
AD7746_NUM_REGISTERS
#define AD7746_NUM_REGISTERS
Definition: ad7746.h:69
ad7746_set_cap
int32_t ad7746_set_cap(struct ad7746_dev *dev, struct ad7746_cap cap)
Configure the capacitive setup register.
Definition: ad7746.c:203
ad7746_setup::cap
struct ad7746_cap cap
Definition: ad7746.h:171
ad7746_get_cap_data
int32_t ad7746_get_cap_data(struct ad7746_dev *dev, uint32_t *cap_data)
Waits until a conversion on the capacitive channel has been finished and returns the output data.
Definition: ad7746.c:483
AD7746_EXCSETUP_EXCB_MSK
#define AD7746_EXCSETUP_EXCB_MSK
Definition: ad7746.h:93
AD7746_EXCSETUP_CLKCTRL_MSK
#define AD7746_EXCSETUP_CLKCTRL_MSK
Definition: ad7746.h:91
no_os_util.h
Header file of utility functions.
ad7746_md
ad7746_md
Definition: ad7746.h:155
AD7746_VTSETUP_EXTREF_MSK
#define AD7746_VTSETUP_EXTREF_MSK
Definition: ad7746.h:86
ad7746_vt::vtchop
bool vtchop
Definition: ad7746.h:131
AD7746_MODE_OFFSET_CALIB
@ AD7746_MODE_OFFSET_CALIB
Definition: ad7746.h:160
AD7746_CAPSETUP_CIN2_MSK
#define AD7746_CAPSETUP_CIN2_MSK
Definition: ad7746.h:79
AD7746_STATUS_RDYVT_MSK
#define AD7746_STATUS_RDYVT_MSK
Definition: ad7746.h:74
ad7746_get_cap_data
int32_t ad7746_get_cap_data(struct ad7746_dev *dev, uint32_t *cap_data)
Waits until a conversion on the capacitive channel has been finished and returns the output data.
Definition: ad7746.c:483
ad7746_dev::i2c_dev
struct no_os_i2c_desc * i2c_dev
Definition: ad7746.h:184
ad7746_init_param::i2c_init
struct no_os_i2c_init_param i2c_init
Definition: ad7746.h:178
ad7746_reset
int32_t ad7746_reset(struct ad7746_dev *dev)
Resets the AD7746.
Definition: ad7746.c:165
AD7746_VTMD_INT_TEMP
@ AD7746_VTMD_INT_TEMP
Definition: ad7746.h:120
AD7746_EXC_PIN_NORMAL
@ AD7746_EXC_PIN_NORMAL
Definition: ad7746.h:137
ad7746_vt::vtmd
enum ad7746_vtmd vtmd
Definition: ad7746.h:128
AD7746_REG_STATUS
#define AD7746_REG_STATUS
Definition: ad7746.h:49
ID_AD7745
@ ID_AD7745
Definition: ad7746.h:107
ad7746_set_config
int32_t ad7746_set_config(struct ad7746_dev *dev, struct ad7746_config config)
Set the configuration register.
Definition: ad7746.c:301
AD7746_EXCSETUP_EXCLVL_MSK
#define AD7746_EXCSETUP_EXCLVL_MSK
Definition: ad7746.h:95