|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
@ SST25VFXXXX_CHIP_ERASE
The chip is busy erasing itself.
#define SST25VFXXXX_AAI_PROG
enum SPIClockDiv cdiv
prescaler of main clock to use as SPI clock
uint8_t output_buf[16]
The output buffer for the SPI transaction.
@ SST25VFXXXX_WRITE_BYTES
The chip is busy writing bytes.
uint8_t transfer_idx
The transfer idx is used for counting input/output bytes.
enum SPIClockPolarity cpol
clock polarity control
@ SST25VFXXXX_READ_BYTES
The chip is busy reading bytes.
void sst25vfxxxx_write(struct SST25VFxxxx *sst, uint8_t *transfer_buffer, uint8_t transfer_length)
Write bytes.
uint16_t output_length
number of data words to write
struct spi_transaction spi_t
The SPI transaction used for the writing and reading of registers.
@ SST25VFXXXX_READ_ID
The chip is busy with getting the chip ID.
uint8_t * transfer_buf
The transfer buffer.
@ SPISelectUnselect
slave is selected before transaction and unselected after
uint8_t status_idx
The counter of substatuses.
enum SPIBitOrder bitorder
MSB/LSB order.
volatile uint8_t * output_buf
pointer to transmit buffer for DMA
SPI peripheral structure.
enum SPISlaveSelect select
slave selection behavior
struct spi_periph * spi_p
The SPI peripheral for the connection.
@ 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.
struct spi_periph * spi_p
The SPI peripheral for the connection.
#define SST25VFXXXX_ERASE_CHIP
void sst25vfxxxx_read(struct SST25VFxxxx *sst, uint8_t *transfer_buffer, uint8_t transfer_length)
Read bytes Need 5 more extra bytes because of SPI overhead.
enum SST25VFxxxxStatus status
The status of the SST25VFxxxx flash chip.
uint32_t flash_addr
The flash address to write at.
void(* SPICallback)(struct spi_transaction *trans)
SPI Callback function.
@ SST25VFXXXX_WRITE_EN
The chip is busy enabeling writing to blocks.
void sst25vfxxxx_block_write_en(struct SST25VFxxxx *sst)
Enable block writing.
@ SST25VFXXXX_IDLE
The chip is idle and can be used.
uint8_t input_buf[16]
The input buffer for the SPI transaction.
uint16_t input_length
number of data words to read
void sst25vfxxxx_chip_erase(struct SST25VFxxxx *sst)
Full chip erase.
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
void sst25vfxxxx_after_cb(struct SST25VFxxxx *sst)
Callback of the SPI after going one level higher for gathering the sst pointer.
#define SST25VFXXXX_BYTE_PROG
enum SPITransactionStatus status
#define SST25VFXXXX_HGIH_SPEAD_READ
void sst25vfxxxx_read_id(struct SST25VFxxxx *sst)
Read the chip identifier.
void sst25vfxxxx_init(struct SST25VFxxxx *sst, struct spi_periph *spi_p, const uint8_t slave_idx, SPICallback spi_cb)
Initializing the sst25vfxxxx chip.
uint8_t transfer_length
The transfer buffer length.