ChibiOS/HAL
6.1.0
|
SPI Driver macros and structures. More...
#include "hal_spi_lld.h"
Go to the source code of this file.
Macros | |
Chip Select modes | |
#define | SPI_SELECT_MODE_NONE |
#define | SPI_SELECT_MODE_PAD 1 /** @brief Legacy mode. */ |
#define | SPI_SELECT_MODE_PORT 2 /** @brief Fastest mode. */ |
#define | SPI_SELECT_MODE_LINE 3 /** @brief Packed mode. */ |
#define | SPI_SELECT_MODE_LLD 4 /** @brief LLD-defined mode.*/ |
SPI configuration options | |
#define | SPI_USE_WAIT TRUE |
Enables synchronous APIs. More... | |
#define | SPI_USE_CIRCULAR FALSE |
Enables circular transfers APIs. More... | |
#define | SPI_USE_MUTUAL_EXCLUSION TRUE |
Enables the spiAcquireBus() and spiReleaseBus() APIs. More... | |
#define | SPI_SELECT_MODE SPI_SELECT_MODE_PAD |
Handling method for SPI CS line. More... | |
Macro Functions | |
#define | spiSelectI(spip) |
Asserts the slave select signal and prepares for transfers. More... | |
#define | spiUnselectI(spip) |
Deasserts the slave select signal. More... | |
#define | spiStartIgnoreI(spip, n) |
Ignores data on the SPI bus. More... | |
#define | spiStartExchangeI(spip, n, txbuf, rxbuf) |
Exchanges data on the SPI bus. More... | |
#define | spiStartSendI(spip, n, txbuf) |
Sends data over the SPI bus. More... | |
#define | spiStartReceiveI(spip, n, rxbuf) |
Receives data from the SPI bus. More... | |
#define | spiPolledExchange(spip, frame) spi_lld_polled_exchange(spip, frame) |
Exchanges one frame using a polled wait. More... | |
Low level driver helper macros | |
#define | _spi_wakeup_isr(spip) |
Wakes up the waiting thread. More... | |
#define | _spi_isr_code(spip) |
Common ISR code. More... | |
#define | _spi_isr_code_half1(spip) |
Common ISR code in circular mode. More... | |
#define | _spi_isr_code_half2(spip) |
Common ISR code in circular mode. More... | |
Enumerations |
Functions | |
void | spiInit (void) |
SPI Driver initialization. More... | |
void | spiObjectInit (SPIDriver *spip) |
Initializes the standard part of a SPIDriver structure. More... | |
void | spiStart (SPIDriver *spip, const SPIConfig *config) |
Configures and activates the SPI peripheral. More... | |
void | spiStop (SPIDriver *spip) |
Deactivates the SPI peripheral. More... | |
void | spiSelect (SPIDriver *spip) |
Asserts the slave select signal and prepares for transfers. More... | |
void | spiUnselect (SPIDriver *spip) |
Deasserts the slave select signal. More... | |
void | spiStartIgnore (SPIDriver *spip, size_t n) |
Ignores data on the SPI bus. More... | |
void | spiStartExchange (SPIDriver *spip, size_t n, const void *txbuf, void *rxbuf) |
Exchanges data on the SPI bus. More... | |
void | spiStartSend (SPIDriver *spip, size_t n, const void *txbuf) |
Sends data over the SPI bus. More... | |
void | spiStartReceive (SPIDriver *spip, size_t n, void *rxbuf) |
Receives data from the SPI bus. More... | |
void | spiAbortI (SPIDriver *spip) |
Aborts the ongoing SPI operation. More... | |
void | spiAbort (SPIDriver *spip) |
Aborts the ongoing SPI operation, if any. More... | |
void | spiIgnore (SPIDriver *spip, size_t n) |
Ignores data on the SPI bus. More... | |
void | spiExchange (SPIDriver *spip, size_t n, const void *txbuf, void *rxbuf) |
Exchanges data on the SPI bus. More... | |
void | spiSend (SPIDriver *spip, size_t n, const void *txbuf) |
Sends data over the SPI bus. More... | |
void | spiReceive (SPIDriver *spip, size_t n, void *rxbuf) |
Receives data from the SPI bus. More... | |
void | spiAcquireBus (SPIDriver *spip) |
Gains exclusive access to the SPI bus. More... | |
void | spiReleaseBus (SPIDriver *spip) |
Releases exclusive access to the SPI bus. More... | |
SPI Driver macros and structures.
Definition in file hal_spi.h.