 |
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
48 eeprom->
spi_p = spi_p;
78 eeprom->
tx_buf[1] = (addr >> 8) & 0xff;
79 eeprom->
tx_buf[2] = addr & 0xff;
enum SPIClockDiv cdiv
prescaler of main clock to use as SPI clock
void eeprom25AA256_init(struct Eeprom25AA256 *eeprom, struct spi_periph *spi_p, uint8_t slave_idx)
Init function.
enum SPIClockPolarity cpol
clock polarity control
struct spi_transaction spi_trans
spi transaction
void eeprom25AA256_read(struct Eeprom25AA256 *eeprom, uint16_t addr, uint16_t length)
Read function.
uint16_t output_length
number of data words to write
Eeprom25AA256InstructionSet
Instruction set.
struct spi_periph * spi_p
spi peripheral
bool data_available
data read flag
void eeprom25AA256_event(struct Eeprom25AA256 *eeprom)
Event function.
@ SPISelectUnselect
slave is selected before transaction and unselected after
enum SPIBitOrder bitorder
MSB/LSB order.
#define E25_OUT_BUFFER_LEN
Output buffer length.
volatile uint8_t * output_buf
pointer to transmit buffer for DMA
SPI peripheral structure.
enum SPISlaveSelect select
slave selection behavior
@ SPICpolIdleLow
CPOL = 0.
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 E25_IN_BUFFER_LEN
Input buffer length.
uint16_t input_length
number of data words to read
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
volatile uint8_t rx_buf[E25_IN_BUFFER_LEN]
receive buffer
volatile uint8_t tx_buf[E25_OUT_BUFFER_LEN]
transmit buffer
SPICallback before_cb
NULL or function called before the transaction.
enum SPITransactionStatus status