|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
129 #define Int16FromBuf(_buf,_idx) ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx]))
enum SPIClockDiv cdiv
prescaler of main clock to use as SPI clock
void adxl345_spi_start_configure(struct Adxl345_Spi *adxl)
enum SPIClockPolarity cpol
clock polarity control
bool drdy_int_enable
Enable Data Ready Interrupt.
#define ADXL345_REG_INT_ENABLE
uint16_t output_length
number of data words to write
enum Adxl345ConfStatus init_status
init status
volatile uint8_t rx_buf[7]
enum Adxl345Rates rate
Data Output Rate.
struct spi_transaction spi_trans
volatile bool data_available
data ready flag
@ SPISelectUnselect
slave is selected before transaction and unselected after
enum SPIBitOrder bitorder
MSB/LSB order.
static void adxl345_spi_write_to_reg(struct Adxl345_Spi *adxl, uint8_t _reg, uint8_t _val)
volatile uint8_t * output_buf
pointer to transmit buffer for DMA
SPI peripheral structure.
enum SPISlaveSelect select
slave selection behavior
void adxl345_spi_event(struct Adxl345_Spi *adxl)
#define ADXL345_REG_DATA_FORMAT
enum SPIClockPhase cpha
clock phase control
SPICallback after_cb
NULL or function called after the transaction.
bool spi_submit(struct spi_periph *p, struct spi_transaction *t)
Submit SPI transaction.
#define ADXL345_REG_BW_RATE
@ SPICpolIdleHigh
CPOL = 1.
struct spi_periph * spi_p
#define ADXL345_REG_POWER_CTL
union Adxl345_Spi::@305 data
uint16_t input_length
number of data words to read
void adxl345_spi_init(struct Adxl345_Spi *adxl, struct spi_periph *spi_p, uint8_t slave_idx)
enum SPIDataSizeSelect dss
data transfer word size
uint8_t slave_idx
slave id: SPI_SLAVE0 to SPI_SLAVE4
volatile uint8_t * input_buf
pointer to receive buffer for DMA
#define ADXL345_REG_DATA_X0
static void adxl345_spi_send_config(struct Adxl345_Spi *adxl)
void adxl345_spi_read(struct Adxl345_Spi *adxl)
volatile uint8_t tx_buf[7]
static void adxl345_set_default_config(struct Adxl345Config *c)
SPICallback before_cb
NULL or function called before the transaction.
struct Adxl345Config config
#define Int16FromBuf(_buf, _idx)
static uint8_t adxl345_data_format(struct Adxl345Config *c)
enum SPITransactionStatus status
bool initialized
config done flag