Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
adxl345.h File Reference
#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

◆ Adxl345Config

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

◆ Adxl345ConfStatus

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

◆ adxl345_data_format()

static uint8_t adxl345_data_format ( struct Adxl345Config c)
inlinestatic

Definition at line 69 of file adxl345.h.

References c().

Referenced by adxl345_spi_send_config().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ adxl345_set_default_config()

static void adxl345_set_default_config ( struct Adxl345Config c)
inlinestatic

Definition at line 56 of file adxl345.h.

References ADXL345_RANGE_16G, ADXL345_RATE_100HZ, and c().

Referenced by adxl345_i2c_init(), and adxl345_spi_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: