ADS101x/111x ADC device driver. More...

Detailed Description

ADS101x/111x ADC device driver.

ADC and alert functionality are separated into two devices to prevent wasteful representations on muxed devices.

Author
Baptiste Le Duc bapti.nosp@m.ste..nosp@m.leduc.nosp@m.38@g.nosp@m.mail..nosp@m.com
Matthew Blue matth.nosp@m.ew.b.nosp@m.lue.n.nosp@m.euro.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Vincent Dupont vince.nosp@m.nt@o.nosp@m.takey.nosp@m.s.co.nosp@m.m

Definition in file ads1x1x.h.

#include "periph/i2c.h"
#include "periph/gpio.h"
+ Include dependency graph for ads1x1x.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ads1x1x_params_t
 ADS101x/111x params. More...
 
struct  ads1x1x_alert_params
 ADS101x/111x alert params. More...
 
struct  ads1x1x
 ADS101x/111x device descriptor. More...
 
struct  ads1x1x_alert
 ADS101x/111x alert device descriptor. More...
 

Typedefs

typedef struct ads1x1x_alert_params ads1x1x_alert_params_t
 ADS101x/111x alert params.
 
typedef struct ads1x1x ads1x1x_t
 ADS101x/111x device descriptor.
 
typedef void(* ads1x1x_alert_cb_t) (void *)
 ADS101x/111x alert callback.
 
typedef struct ads1x1x_alert ads1x1x_alert_t
 ADS101x/111x alert device descriptor.
 

Enumerations

enum  {
  ADS1X1X_OK = 0 , ADS1X1X_NOI2C = -1 , ADS1X1X_NODEV = -2 , ADS1X1X_NODATA = -3 ,
  ADS1X1X_INVALID_ARG = -4 , ADS1X1X_GPIO_ERROR = -5
}
 Named return values. More...
 

Functions

int ads1x1x_init (ads1x1x_t *dev, const ads1x1x_params_t *params)
 Initialize an ADS101x/111x ADC device (ADC only) More...
 
int ads1x1x_set_parameters (ads1x1x_t *dev, const ads1x1x_params_t *params)
 Set ADS101x/111x parameters. More...
 
int ads1x1x_alert_init (ads1x1x_alert_t *dev, const ads1x1x_alert_params_t *params)
 Initialize an ADS101x/111x alert device. More...
 
int ads1x1x_set_mux (ads1x1x_t *dev, uint8_t mux)
 Set mux. More...
 
int ads1x1x_read_raw (const ads1x1x_t *dev, int16_t *raw)
 Read a raw ADC value. More...
 
int ads1x1x_enable_alert (ads1x1x_alert_t *dev, ads1x1x_alert_cb_t cb, void *arg, uint8_t nb_assert)
 Enable alert interrupt. More...
 
int ads1x1x_set_alert_parameters (ads1x1x_alert_t *dev, const ads1x1x_alert_params_t *params)
 Set the alert parameters. More...
 
int ads1x1x_convert_to_mv (const ads1x1x_t *dev, int16_t value)
 Converts the digital value from an ADS101x/111x device to millivolts. More...
 
int ads1x1x_reset (i2c_t i2c)
 Reset the ADS1X1X devices on the I2C bus. More...