![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the ADS1220 24-bits ADC from TI SPI communication. More...
Go to the source code of this file.
Data Structures | |
struct | Ads1220Config |
ADS1220 configuration options. More... | |
struct | Ads1220 |
Macros | |
#define | ADS1220_BUFFER_LEN 5 |
Functions | |
void | ads1220_init (struct Ads1220 *ads, struct spi_periph *spi_p, uint8_t slave_idx) |
void | ads1220_configure (struct Ads1220 *ads) |
void | ads1220_read (struct Ads1220 *ads) |
void | ads1220_event (struct Ads1220 *ads) |
static void | ads1220_periodic (struct Ads1220 *ads) |
convenience function: read or start configuration if not already initialized | |
Variables | |
static const float | Ads1220GainTable [] |
Driver for the ADS1220 24-bits ADC from TI SPI communication.
Definition in file ads1220.h.
struct Ads1220Config |
Data Fields | ||
---|---|---|
enum Ads1220ConvMode | conv | conversion mode |
enum Ads1220Gain | gain | gain |
enum Ads1220Imux | i1mux | IDAC routing 1. |
enum Ads1220Imux | i2mux | IDAC routing 2. |
enum Ads1220Idac | idac | IDAC config. |
enum Ads1220Mux | mux | input multiplexer |
bool | pga_bypass | bypass PGA (PGA enabled = 0) |
enum Ads1220SampleRate | rate | data output rate |
enum Ads1220ConfStatus | status | config status |
enum Ads1220VRef | vref | voltage ref |
struct Ads1220 |
Data Fields | ||
---|---|---|
struct Ads1220Config | config | configuration |
uint32_t | data | raw ADC value |
volatile bool | data_available | data ready flag |
volatile uint8_t | rx_buf[ADS1220_BUFFER_LEN] | receive buffer |
struct spi_periph * | spi_p | spi peripheral |
struct spi_transaction | spi_trans | spi transaction |
volatile uint8_t | tx_buf[ADS1220_BUFFER_LEN] | transmit buffer |
Definition at line 102 of file ads1220.c.
References ADS1220_INITIALIZING, ADS1220_RESET, ads1220_send_config(), ADS1220_SEND_RESET, ADS1220_UNINIT, foo, spi_submit(), SPITransDone, and SPITransSuccess.
Referenced by ads1220_periodic().
Definition at line 130 of file ads1220.c.
References ADS1220_INITIALIZED, ADS1220_INITIALIZING, ADS1220_SEND_RESET, ADS1220_UNINIT, foo, SPITransDone, SPITransFailed, and SPITransSuccess.
Referenced by meteo_stick_event().
|
extern |
Definition at line 49 of file ads1220.c.
References ADS1220_UNINIT, foo, SPICphaEdge2, SPICpolIdleLow, SPIDiv128, SPIDss8bit, SPIMSBFirst, SPISelectUnselect, SPITransDone, and spi_periph::status.
Referenced by meteo_stick_init().
convenience function: read or start configuration if not already initialized
Definition at line 171 of file ads1220.h.
References ads1220_configure(), ADS1220_INITIALIZED, ads1220_read(), and foo.
Referenced by meteo_stick_periodic().
Definition at line 120 of file ads1220.c.
References ADS1220_INITIALIZED, foo, spi_submit(), and SPITransDone.
Referenced by ads1220_periodic().
Definition at line 78 of file ads1220.h.
Referenced by get_diff(), and get_temp().