Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
adxl345.h File Reference

Analog Devices ADXL345 accelerometer driver common interface (I2C and SPI). More...

#include "std.h"
#include "peripherals/adxl345_regs.h"
+ Include dependency graph for adxl345.h:
+ This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

Analog Devices ADXL345 accelerometer driver common interface (I2C and SPI).

Definition in file adxl345.h.


Data Structure Documentation

struct Adxl345Config

Definition at line 45 of file adxl345.h.

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.

Enumeration Type Documentation

Enumerator
ADXL_CONF_UNINIT 
ADXL_CONF_RATE 
ADXL_CONF_INT 
ADXL_CONF_FORMAT 
ADXL_CONF_ENABLE 
ADXL_CONF_DONE 

Definition at line 36 of file adxl345.h.

Function Documentation

static uint8_t adxl345_data_format ( struct Adxl345Config c)
inlinestatic
static void adxl345_set_default_config ( struct Adxl345Config c)
inlinestatic