Go to the documentation of this file.
52 #ifndef CONFIG_ADS101X_I2C_ADDRESS
53 #define CONFIG_ADS101X_I2C_ADDRESS (0x48)
178 int16_t low_limit, int16_t high_limit);
uint8_t mux_gain
Mux and gain boolean settings.
gpio_t alert_pin
alert pin (GPIO_UNDEF if not connected)
struct ads101x_alert_params ads101x_alert_params_t
ADS101x/111x alert params.
struct ads101x ads101x_t
ADS101x/111x device descriptor.
ADS101x/111x device descriptor.
struct ads101x_alert ads101x_alert_t
ADS101x/111x alert device descriptor.
@ ADS101X_NODATA
no data available
unsigned int i2c_t
Default i2c_t type definition.
int ads101x_alert_init(ads101x_alert_t *dev, const ads101x_alert_params_t *params)
Initialize an ADS101x/111x alert device.
int ads101x_set_mux_gain(const ads101x_t *dev, uint8_t mux_gain)
Set mux and gain.
ads101x_alert_cb_t cb
alert callback
int ads101x_enable_alert(ads101x_alert_t *dev, ads101x_alert_cb_t cb, void *arg)
Enable alert interrupt.
@ ADS101X_NOI2C
I2C communication failed.
ads101x_alert_params_t params
device driver configuration
int ads101x_init(ads101x_t *dev, const ads101x_params_t *params)
Initialize an ADS101x/111x ADC device (ADC only)
void * arg
alert callback param
ADS101x/111x alert device descriptor.
struct ads101x_params ads101x_params_t
ADS101x/111x params.
int16_t high_limit
alert high value
@ ADS101X_NODEV
no ADS101X device found on the bus
ADS101x/111x alert params.
ads101x_params_t params
device driver configuration
int ads101x_set_alert_parameters(const ads101x_alert_t *dev, int16_t low_limit, int16_t high_limit)
Set the alert parameters.
Low-level GPIO peripheral driver interface definitions.
void(* ads101x_alert_cb_t)(void *)
ADS101x/111x alert callback.
Low-level I2C peripheral driver interface definition.
int16_t low_limit
alert low value
int ads101x_read_raw(const ads101x_t *dev, int16_t *raw)
Read a raw ADC value.
@ ADS101X_OK
everything was fine