Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
Analog Devices ADXL345 accelerometer driver common interface (I2C and SPI). More...
Go to the source code of this file.
Data Structures | |
struct | Adxl345Config |
Enumerations | |
enum | Adxl345ConfStatus { ADXL_CONF_UNINIT = 0, ADXL_CONF_RATE = 1, ADXL_CONF_INT = 2, ADXL_CONF_FORMAT = 3, ADXL_CONF_ENABLE = 4, ADXL_CONF_DONE = 5 } |
Functions | |
static void | adxl345_set_default_config (struct Adxl345Config *c) |
static uint8_t | adxl345_data_format (struct Adxl345Config *c) |
Analog Devices ADXL345 accelerometer driver common interface (I2C and SPI).
Definition in file adxl345.h.
struct Adxl345Config |
Data Fields | ||
---|---|---|
bool | drdy_int_enable | Enable Data Ready Interrupt. |
bool | full_res | Full Resolution: FALSE: 10bit, TRUE: full with 4mg/LSB. |
bool | int_invert | Invert Interrupt FALSE: active high, TRUE: active low. |
bool | justify_msb | justify: FALSE: right with sign-extension, TRUE: MSB (left) |
enum Adxl345Ranges | range | g Range |
enum Adxl345Rates | rate | Data Output Rate. |
bool | self_test | Enable self-test-force causing shift in output data. |
bool | spi_3_wire | Set 3-wire SPI mode, if FALSE: 4-wire SPI mode. |
enum Adxl345ConfStatus |
|
inlinestatic |
Definition at line 69 of file adxl345.h.
References Adxl345Config::full_res, Adxl345Config::int_invert, Adxl345Config::justify_msb, Adxl345Config::range, Adxl345Config::self_test, and Adxl345Config::spi_3_wire.
Referenced by adxl345_spi_send_config().
|
inlinestatic |
Definition at line 56 of file adxl345.h.
References ADXL345_RANGE_16G, ADXL345_RATE_100HZ, Adxl345Config::drdy_int_enable, Adxl345Config::full_res, Adxl345Config::int_invert, Adxl345Config::justify_msb, Adxl345Config::range, Adxl345Config::rate, Adxl345Config::self_test, and Adxl345Config::spi_3_wire.
Referenced by adxl345_i2c_init(), and adxl345_spi_init().