Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
ads1220.c File Reference
+ 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

◆ ADS1220_CONF0

#define ADS1220_CONF0   0x0

Definition at line 42 of file ads1220.c.

◆ ADS1220_CONF1

#define ADS1220_CONF1   0x1

Definition at line 43 of file ads1220.c.

◆ ADS1220_CONF2

#define ADS1220_CONF2   0x2

Definition at line 44 of file ads1220.c.

◆ ADS1220_CONF3

#define ADS1220_CONF3   0x3

Definition at line 45 of file ads1220.c.

◆ ADS1220_POWERDOWN

#define ADS1220_POWERDOWN   0x02

Definition at line 38 of file ads1220.c.

◆ ADS1220_RDATA

#define ADS1220_RDATA   0x10

Definition at line 39 of file ads1220.c.

◆ ADS1220_RESET

#define ADS1220_RESET   0x06

Definition at line 36 of file ads1220.c.

◆ ADS1220_RREG

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

Definition at line 35 of file ads1220.c.

◆ ADS1220_START_SYNC

#define ADS1220_START_SYNC   0x08

Definition at line 37 of file ads1220.c.

◆ ADS1220_WREG

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

Definition at line 34 of file ads1220.c.

Function Documentation

◆ ads1220_configure()

void ads1220_configure ( struct Ads1220 ads)

◆ ads1220_event()

◆ ads1220_init()

◆ ads1220_read()

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:

◆ ads1220_send_config()