Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ads1220.c File Reference

Driver for the ADS1220 24-bits ADC from TI SPI communication. More...

+ Include dependency graph for ads1220.c:

Go to the source code of this file.

Macros

#define ADS1220_WREG(_reg, _nb)   ((1<<6)|(_reg<<2)|(_nb-1))
 
#define ADS1220_RREG(_reg, _nb)   ((1<<5)|(_reg<<2)|(_nb-1))
 
#define ADS1220_RESET   0x06
 
#define ADS1220_START_SYNC   0x08
 
#define ADS1220_POWERDOWN   0x02
 
#define ADS1220_RDATA   0x10
 
#define ADS1220_CONF0   0x0
 
#define ADS1220_CONF1   0x1
 
#define ADS1220_CONF2   0x2
 
#define ADS1220_CONF3   0x3
 

Functions

void ads1220_init (struct Ads1220 *ads, struct spi_periph *spi_p, uint8_t slave_idx)
 
static void ads1220_send_config (struct Ads1220 *ads)
 
void ads1220_configure (struct Ads1220 *ads)
 
void ads1220_read (struct Ads1220 *ads)
 
void ads1220_event (struct Ads1220 *ads)
 

Detailed Description

Driver for the ADS1220 24-bits ADC from TI SPI communication.

Definition in file ads1220.c.

Macro Definition Documentation

#define ADS1220_CONF0   0x0

Definition at line 42 of file ads1220.c.

Referenced by ads1220_send_config().

#define ADS1220_CONF1   0x1

Definition at line 43 of file ads1220.c.

#define ADS1220_CONF2   0x2

Definition at line 44 of file ads1220.c.

#define ADS1220_CONF3   0x3

Definition at line 45 of file ads1220.c.

#define ADS1220_POWERDOWN   0x02

Definition at line 38 of file ads1220.c.

#define ADS1220_RDATA   0x10

Definition at line 39 of file ads1220.c.

#define ADS1220_RESET   0x06

Definition at line 36 of file ads1220.c.

Referenced by ads1220_configure().

#define ADS1220_RREG (   _reg,
  _nb 
)    ((1<<5)|(_reg<<2)|(_nb-1))

Definition at line 35 of file ads1220.c.

#define ADS1220_START_SYNC   0x08

Definition at line 37 of file ads1220.c.

#define ADS1220_WREG (   _reg,
  _nb 
)    ((1<<6)|(_reg<<2)|(_nb-1))

Definition at line 34 of file ads1220.c.

Referenced by ads1220_send_config().

Function Documentation

void ads1220_configure ( struct Ads1220 ads)
void ads1220_read ( struct Ads1220 ads)

Definition at line 120 of file ads1220.c.

References ADS1220_INITIALIZED, Ads1220::config, spi_transaction::input_length, spi_transaction::output_length, Ads1220::spi_p, spi_submit(), Ads1220::spi_trans, SPITransDone, spi_transaction::status, and Ads1220Config::status.

Referenced by ads1220_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: