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

Driver for the accelerometer ADXL345 from Analog Devices using SPI. More...

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

Go to the source code of this file.

Data Structures

struct  Adxl345_Spi
 

Functions

void adxl345_spi_init (struct Adxl345_Spi *adxl, struct spi_periph *spi_p, uint8_t addr)
 
void adxl345_spi_start_configure (struct Adxl345_Spi *adxl)
 
void adxl345_spi_read (struct Adxl345_Spi *adxl)
 
void adxl345_spi_event (struct Adxl345_Spi *adxl)
 
static void adxl345_spi_periodic (struct Adxl345_Spi *adxl)
 convenience function: read or start configuration if not already initialized More...
 

Detailed Description

Driver for the accelerometer ADXL345 from Analog Devices using SPI.

Definition in file adxl345_spi.h.

Function Documentation

static void adxl345_spi_periodic ( struct Adxl345_Spi adxl)
inlinestatic

convenience function: read or start configuration if not already initialized

Definition at line 61 of file adxl345_spi.h.

References adxl345_spi_read(), adxl345_spi_start_configure(), and Adxl345_Spi::initialized.

Referenced by imu_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void adxl345_spi_read ( struct Adxl345_Spi adxl)

Definition at line 117 of file adxl345_spi.c.

References ADXL345_REG_DATA_X0, Adxl345_Spi::initialized, spi_transaction::input_length, spi_transaction::output_length, Adxl345_Spi::spi_p, spi_submit(), Adxl345_Spi::spi_trans, SPITransDone, spi_transaction::status, and Adxl345_Spi::tx_buf.

Referenced by adxl345_spi_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void adxl345_spi_start_configure ( struct Adxl345_Spi adxl)

Definition at line 107 of file adxl345_spi.c.

References adxl345_spi_send_config(), ADXL_CONF_UNINIT, Adxl345_Spi::init_status, Adxl345_Spi::spi_trans, SPITransDone, SPITransSuccess, and spi_transaction::status.

Referenced by adxl345_spi_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: