|
PER Firmware
|
Configuration entry for SPI initilization. More...
#include <spi.h>
Public Attributes | |
| uint32_t | data_rate |
| Target baudrate in b/s (might be different depending on peripheral clock divison) | |
| uint8_t | data_len |
| Number of bits per transaction. | |
| bool | nss_sw |
| Save Select controlled by Software. | |
| GPIO_TypeDef * | nss_gpio_port |
| GPIO Port of SPI CS Pin. | |
| uint32_t | nss_gpio_pin |
| GPIO Pin of SPI CS Pin. | |
| dma_init_t * | rx_dma_cfg |
| DMA initilization for RX transfer. | |
| dma_init_t * | tx_dma_cfg |
| DMA initilization for TX transfer. | |
| volatile bool | _busy |
| SPI Peripheral currently in a transaction. | |
| volatile bool | _error |
| SPI Peripheral current transaction error. | |
| volatile bool | _direct_mode_error |
| DMA error while attempting to operate in direct mode. | |
| volatile bool | _fifo_overrun |
| DMA FIFO has been overrun - this should never occur, as it should never be enabled. | |
| SPI_TypeDef * | periph |
| SPI Peripheral. | |
| SPI_Mode | mode |
| SPI_CPOL | cpol |
| SPI_CPHA | cpha |
| PHAL_DMA_Handle_t * | rx_dma |
| PHAL_DMA_Handle_t * | tx_dma |
Configuration entry for SPI initilization.
SPI peripheral configuration.
| volatile bool SPI_InitConfig_t::_busy |
SPI Peripheral currently in a transaction.
Internal transfer busy flag
| volatile bool SPI_InitConfig_t::_direct_mode_error |
DMA error while attempting to operate in direct mode.
Internal DMA direct mode error flag
| volatile bool SPI_InitConfig_t::_error |
SPI Peripheral current transaction error.
Internal DMA transfer error flag
| volatile bool SPI_InitConfig_t::_fifo_overrun |
DMA FIFO has been overrun - this should never occur, as it should never be enabled.
Internal DMA FIFO overrun flag
| SPI_CPHA SPI_InitConfig_t::cpha |
Clock sampling phase
| SPI_CPOL SPI_InitConfig_t::cpol |
Clock idle polarity
| uint8_t SPI_InitConfig_t::data_len |
Number of bits per transaction.
Transfer width in bits
| uint32_t SPI_InitConfig_t::data_rate |
Target baudrate in b/s (might be different depending on peripheral clock divison)
Desired SPI clock frequency (Hz)
| SPI_Mode SPI_InitConfig_t::mode |
Master or slave mode
| uint32_t SPI_InitConfig_t::nss_gpio_pin |
GPIO Pin of SPI CS Pin.
Chip select GPIO pin (master only)
| GPIO_TypeDef * SPI_InitConfig_t::nss_gpio_port |
GPIO Port of SPI CS Pin.
Chip select GPIO port (master only)
| bool SPI_InitConfig_t::nss_sw |
Save Select controlled by Software.
true = software-controlled chip select
| SPI_TypeDef * SPI_InitConfig_t::periph |
SPI Peripheral.
SPI peripheral instance
| PHAL_DMA_Handle_t* SPI_InitConfig_t::rx_dma |
RX DMA handle (required, all transfers are DMA backed)
| dma_init_t* SPI_InitConfig_t::rx_dma_cfg |
DMA initilization for RX transfer.
| PHAL_DMA_Handle_t* SPI_InitConfig_t::tx_dma |
TX DMA handle (required, all transfers are DMA backed)
| dma_init_t* SPI_InitConfig_t::tx_dma_cfg |
DMA initilization for TX transfer.