56 #define AD7746_ZERO_SCALE_CODE  (0x800000LL) 
   61 #define AD7746_INTERNAL_VREF    (1170) 
   66 #define AD7746_DAC_MAX          (0x7F) 
Low-level GPIO peripheral driver interface definitions.
 
int ad7746_set_cap_ch_input(const ad7746_t *dev, ad7746_cap_input_t input)
Sets the current input for the capacitive measurement.If not configured manually, the driver sets the...
 
struct ad7746 ad7746_t
AD7746 device descriptor.
 
ad7746_exc_config_t
Excitation signal output configuration.
 
int ad7746_set_vt_ch_mode(ad7746_t *dev, ad7746_vt_mode_t mode)
Sets the mode for the voltage / temperature channel and updates the descriptor with the new configura...
 
ad7746_cap_input_t
Capacitance channel input.
 
int ad7746_read_capacitance_2(ad7746_t *dev, int *value)
Reads the capacitance from the input 2 (CIN2).
 
int ad7746_init(ad7746_t *dev, const ad7746_params_t *params)
Initializes an AD7746 device.
 
ad7746_vt_mode_t
Voltage / Temperature channel modes.
 
int ad7746_read_voltage_in(ad7746_t *dev, int *value)
Reads the voltage from the external voltage input (VIN).
 
int ad7746_set_vt_sr(const ad7746_t *dev, ad7746_vt_sample_rate_t sr)
Sets the sample rate for the voltage / temperature channel.
 
int ad7746_read_capacitance_1(ad7746_t *dev, int *value)
Reads the capacitance from the input 1 (CIN1).
 
int ad7746_read_temperature_ext(ad7746_t *dev, int *value)
Reads the temperature from the external sensor (see datasheet).
 
struct ad7746_params ad7746_params_t
AD7746 params.
 
ad7746_vt_sample_rate_t
Voltage / Temperature channel sample rates.
 
int ad7746_read_voltage_vdd(ad7746_t *dev, int *value)
Reads the voltage from the VDD pin.
 
int ad7746_set_cap_sr(const ad7746_t *dev, ad7746_cap_sample_rate_t sr)
Sets the sample rate for the capacitance channel.
 
ad7746_cap_sample_rate_t
Capacitive channel sample rate.
 
int ad7746_read_temperature_int(ad7746_t *dev, int *value)
Reads the temperature from the internal sensor.
 
@ AD7746_READ_VT_CH
read voltage / temperature channel
 
@ AD7746_READ_CAP_CH
read capacitive channel
 
@ AD7746_EXC_B
enable only exc B output
 
@ AD7746_EXC_AB
enable exc A and B outputs
 
@ AD7746_EXC_A
enable only exc A output
 
@ AD7746_CAP_IN_1
CIN1 input.
 
@ AD7746_CAP_IN_2
CIN2 input.
 
@ AD7746_VT_MD_TEMP
internal temperature sensor
 
@ AD7746_VT_MD_DIS
channel disabled
 
@ AD7746_VT_MD_VDD
Vdd voltage monitor.
 
@ AD7746_VT_MD_ETEMP
external temperature sensor (see datasheet)
 
@ AD7746_VT_MD_VIN
external voltage input (Vin)
 
@ AD7746_VT_SR_312
31.2 Hz
 
@ AD7746_VT_SR_498
49.8 Hz
 
@ AD7746_VT_SR_161
16.1 Hz
 
@ AD7746_CAP_SR_109
10.9 Hz
 
@ AD7746_CAP_SR_130
13.0 Hz
 
@ AD7746_CAP_SR_263
26.3 Hz
 
@ AD7746_CAP_SR_500
50.0 Hz
 
@ AD7746_CAP_SR_161
16.1 Hz
 
@ AD7746_CAP_SR_091
9.1 Hz
 
@ AD7746_CAP_SR_909
90.9 Hz
 
@ AD7746_CAP_SR_838
83.8 Hz
 
@ AD7746_NOI2C
I2C communication failed.
 
@ AD7746_OK
everything was fine
 
@ AD7746_NODEV
no AD7746 device found on the bus
 
@ AD7746_NODATA
no data available
 
uint_fast8_t i2c_t
Default i2c_t type definition.
 
Low-level I2C peripheral driver interface definition.
 
ad7746_exc_config_t exc_config
excitation signal config
 
ad7746_vt_mode_t vt_mode
mode of the voltage/temp ch
 
ad7746_cap_sample_rate_t cap_sample_rate
capacitance sample rate
 
uint8_t dac_b_cap
DAC B capacitance.
 
ad7746_cap_input_t cap_input
selected capacitance input
 
uint8_t dac_a_cap
DAC A capacitance.
 
ad7746_vt_sample_rate_t vt_sample_rate
voltage/temp sample rate
 
AD7746 device descriptor.
 
ad7746_params_t params
device driver configuration