Go to the documentation of this file.
57 #define AD7746_ZERO_SCALE_CODE (0x800000LL)
62 #define AD7746_INTERNAL_VREF (1170)
67 #define AD7746_DAC_MAX (0x7F)
@ AD7746_EXC_AB
enable exc A and B outputs
@ AD7746_VT_MD_VIN
external voltage input (Vin)
ad7746_cap_input_t
Capacitance channel input.
ad7746_vt_mode_t
Voltage / Temperature channel modes.
int ad7746_init(ad7746_t *dev, const ad7746_params_t *params)
Initializes an AD7746 device.
@ AD7746_CAP_IN_1
CIN1 input.
@ AD7746_CAP_SR_263
26.3 Hz
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 cap_sample_rate
capacitance sample rate
int ad7746_read_temperature_int(ad7746_t *dev, int *value)
Reads the temperature from the internal sensor.
@ AD7746_CAP_SR_161
16.1 Hz
ad7746_vt_mode_t vt_mode
mode of the voltage/temp ch
@ AD7746_CAP_SR_500
50.0 Hz
@ AD7746_CAP_SR_838
83.8 Hz
int ad7746_read_capacitance_2(ad7746_t *dev, int *value)
Reads the capacitance from the input 2 (CIN2).
ad7746_cap_sample_rate_t
Capacitive channel sample rate.
unsigned int i2c_t
Default i2c_t type definition.
ad7746_exc_config_t exc_config
excitation signal config
@ AD7746_CAP_SR_109
10.9 Hz
uint8_t dac_a_cap
DAC A capacitance.
@ AD7746_CAP_SR_909
90.9 Hz
int ad7746_read_capacitance_1(ad7746_t *dev, int *value)
Reads the capacitance from the input 1 (CIN1).
uint8_t dac_b_cap
DAC B capacitance.
@ AD7746_EXC_A
enable only exc A output
@ AD7746_NOI2C
I2C communication failed.
ad7746_params_t params
device driver configuration
ad7746_vt_sample_rate_t
Voltage / Temperature channel sample rates.
@ AD7746_CAP_SR_130
13.0 Hz
struct ad7746 ad7746_t
AD7746 device descriptor.
@ AD7746_VT_MD_VDD
Vdd voltage monitor.
int ad7746_read_voltage_in(ad7746_t *dev, int *value)
Reads the voltage from the external voltage input (VIN).
ad7746_vt_sample_rate_t vt_sample_rate
voltage/temp sample rate
struct ad7746_params ad7746_params_t
AD7746 params.
ad7746_cap_input_t cap_input
selected capacitance input
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...
@ AD7746_VT_MD_TEMP
internal temperature sensor
@ AD7746_VT_SR_312
31.2 Hz
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_temperature_ext(ad7746_t *dev, int *value)
Reads the temperature from the external sensor (see datasheet).
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_IN_2
CIN2 input.
int ad7746_read_voltage_vdd(ad7746_t *dev, int *value)
Reads the voltage from the VDD pin.
ad7746_exc_config_t
Excitation signal output configuration.
@ AD7746_VT_SR_498
49.8 Hz
Low-level GPIO peripheral driver interface definitions.
@ AD7746_VT_MD_DIS
channel disabled
@ AD7746_EXC_B
enable only exc B output
AD7746 device descriptor.
@ AD7746_CAP_SR_091
9.1 Hz
@ AD7746_READ_CAP_CH
read capacitive channel
@ AD7746_VT_MD_ETEMP
external temperature sensor (see datasheet)
@ AD7746_READ_VT_CH
read voltage / temperature channel
@ AD7746_VT_SR_161
16.1 Hz
@ AD7746_NODEV
no AD7746 device found on the bus
@ AD7746_NODATA
no data available
@ AD7746_OK
everything was fine
Low-level I2C peripheral driver interface definition.