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
spi_transaction Struct Reference

SPI transaction structure. More...

#include <spi.h>

+ Collaboration diagram for spi_transaction:

Data Fields

volatile uint8_tinput_buf
 pointer to receive buffer for DMA More...
 
volatile uint8_toutput_buf
 pointer to transmit buffer for DMA More...
 
uint8_t input_length
 number of data words to read More...
 
uint8_t output_length
 number of data words to write More...
 
uint8_t slave_idx
 slave id: SPI_SLAVE0 to SPI_SLAVE4 More...
 
enum SPISlaveSelect select
 slave selection behavior More...
 
enum SPIClockPolarity cpol
 clock polarity control More...
 
enum SPIClockPhase cpha
 clock phase control More...
 
enum SPIDataSizeSelect dss
 data transfer word size More...
 
enum SPIBitOrder bitorder
 MSB/LSB order. More...
 
enum SPIClockDiv cdiv
 prescaler of main clock to use as SPI clock More...
 
SPICallback before_cb
 NULL or function called before the transaction. More...
 
SPICallback after_cb
 NULL or function called after the transaction. More...
 
enum SPITransactionStatus status
 

Detailed Description

SPI transaction structure.

  • Use this structure to store a request of SPI transaction and submit it using spi_submit function
  • The input/output buffers needs to be created separately
  • Take care of pointing input_buf/ouput_buf correctly
  • input_length and output_length can be different, the larger number of the two specifies the toal number of exchanged words,
  • if input_length is larger than output length, 0 is sent for the remaining words

Definition at line 142 of file spi.h.

Field Documentation

SPICallback spi_transaction::before_cb

NULL or function called before the transaction.

Definition at line 154 of file spi.h.

Referenced by adxl345_spi_init(), imu_impl_init(), l3gd20_spi_init(), lis302dl_spi_init(), max7456_init(), mpu60x0_spi_init(), ms2100_init(), ms5611_spi_init(), and spi_start_dma_transaction().


The documentation for this struct was generated from the following file: