![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for the accelerometer ADXL345 from Analog Devices using SPI. More...
#include "peripherals/adxl345_spi.h"
Go to the source code of this file.
Macros | |
#define | Int16FromBuf(_buf, _idx) ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx])) |
Functions | |
void | adxl345_spi_init (struct Adxl345_Spi *adxl, struct spi_periph *spi_p, uint8_t slave_idx) |
static void | adxl345_spi_write_to_reg (struct Adxl345_Spi *adxl, uint8_t _reg, uint8_t _val) |
static void | adxl345_spi_send_config (struct Adxl345_Spi *adxl) |
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) |
Driver for the accelerometer ADXL345 from Analog Devices using SPI.
Definition in file adxl345_spi.c.
Definition at line 129 of file adxl345_spi.c.
void adxl345_spi_event | ( | struct Adxl345_Spi * | adxl | ) |
Definition at line 131 of file adxl345_spi.c.
References adxl345_spi_send_config(), ADXL_CONF_UNINIT, foo, Int16FromBuf, SPITransDone, SPITransFailed, and SPITransSuccess.
Referenced by imu_aspirin_event().
void adxl345_spi_init | ( | struct Adxl345_Spi * | adxl, |
struct spi_periph * | spi_p, | ||
uint8_t | slave_idx | ||
) |
Definition at line 35 of file adxl345_spi.c.
References adxl345_set_default_config(), ADXL_CONF_UNINIT, foo, SPICphaEdge2, SPICpolIdleHigh, SPIDiv64, SPIDss8bit, SPIMSBFirst, SPISelectUnselect, SPITransDone, and spi_periph::status.
Referenced by imu_aspirin_init().
void adxl345_spi_read | ( | struct Adxl345_Spi * | adxl | ) |
Definition at line 118 of file adxl345_spi.c.
References ADXL345_REG_DATA_X0, foo, spi_submit(), and SPITransDone.
Referenced by adxl345_spi_periodic().
|
static |
Definition at line 79 of file adxl345_spi.c.
References adxl345_data_format(), ADXL345_REG_BW_RATE, ADXL345_REG_DATA_FORMAT, ADXL345_REG_INT_ENABLE, ADXL345_REG_POWER_CTL, adxl345_spi_write_to_reg(), ADXL_CONF_DONE, ADXL_CONF_ENABLE, ADXL_CONF_FORMAT, ADXL_CONF_INT, ADXL_CONF_RATE, foo, and SPITransDone.
Referenced by adxl345_spi_event(), and adxl345_spi_start_configure().
void adxl345_spi_start_configure | ( | struct Adxl345_Spi * | adxl | ) |
Definition at line 108 of file adxl345_spi.c.
References adxl345_spi_send_config(), ADXL_CONF_UNINIT, foo, SPITransDone, and SPITransSuccess.
Referenced by adxl345_spi_periodic().
|
static |
Definition at line 69 of file adxl345_spi.c.
References foo, and spi_submit().
Referenced by adxl345_spi_send_config().