28 #if (HAL_USE_SPI == TRUE) || defined(__DOXYGEN__) 37 #define SPI_SUPPORTS_CIRCULAR TRUE 52 #if !defined(PLATFORM_SPI_USE_SPI1) || defined(__DOXYGEN__) 53 #define PLATFORM_SPI_USE_SPI1 FALSE 84 #if (SPI_SUPPORTS_CIRCULAR == TRUE) || defined(__DOXYGEN__) 94 #if (SPI_SELECT_MODE == SPI_SELECT_MODE_LINE) || defined(__DOXYGEN__) 100 #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PORT) || defined(__DOXYGEN__) 110 #if (SPI_SELECT_MODE == SPI_SELECT_MODE_PAD) || defined(__DOXYGEN__) 137 #if (SPI_USE_WAIT == TRUE) || defined(__DOXYGEN__) 143 #if (SPI_USE_MUTUAL_EXCLUSION == TRUE) || defined(__DOXYGEN__) 149 #if defined(SPI_DRIVER_EXT_FIELDS) 150 SPI_DRIVER_EXT_FIELDS
163 #if (PLATFORM_SPI_USE_SPI1 == TRUE) && !defined(__DOXYGEN__) 173 #if (SPI_SELECT_MODE == SPI_SELECT_MODE_LLD) || defined(__DOXYGEN__) 181 const void *txbuf,
void *rxbuf);
184 #if (SPI_SUPPORTS_CIRCULAR == TRUE) || defined(__DOXYGEN__) void spi_lld_ignore(SPIDriver *spip, size_t n)
Ignores data on the SPI bus.
uint32_t ioportmask_t
Digital I/O port sized unsigned type.
spistate_t
Driver state machine possible states.
void spi_lld_receive(SPIDriver *spip, size_t n, void *rxbuf)
Receives data from the SPI bus.
uint32_t ioline_t
Type of an I/O line.
void spi_lld_send(SPIDriver *spip, size_t n, const void *txbuf)
Sends data over the SPI bus.
ioline_t ssline
The chip select line.
const SPIConfig * config
Current configuration data.
uint32_t ioportid_t
Port Identifier.
uint_fast8_t sspad
The chip select pad number.
void(* spicallback_t)(SPIDriver *spip)
SPI notification callback type.
Driver configuration structure.
void spi_lld_exchange(SPIDriver *spip, size_t n, const void *txbuf, void *rxbuf)
Exchanges data on the SPI bus.
ioportmask_t ssmask
The chip select port mask.
void spi_lld_stop(SPIDriver *spip)
Deactivates the SPI peripheral.
void spi_lld_abort(SPIDriver *spip)
Aborts the ongoing SPI operation, if any.
void spi_lld_start(SPIDriver *spip)
Configures and activates the SPI peripheral.
void * thread_reference_t
Type of a thread reference.
void spi_lld_init(void)
Low level SPI driver initialization.
mutex_t mutex
Mutex protecting the peripheral.
void spi_lld_unselect(SPIDriver *spip)
Deasserts the slave select signal.
thread_reference_t thread
Waiting thread.
bool circular
Enables the circular buffer mode.
uint16_t spi_lld_polled_exchange(SPIDriver *spip, uint16_t frame)
Exchanges one frame using a polled wait.
uint32_t mutex_t
Type of a mutex.
void spi_lld_select(SPIDriver *spip)
Asserts the slave select signal and prepares for transfers.
spicallback_t end_cb
Operation complete callback or NULL.
ioportid_t ssport
The chip select port.
SPIDriver SPID1
SPI1 driver identifier.
Structure representing an SPI driver.
spistate_t state
Driver state.