Data transfers functions. More...
Functions | |
HAL_StatusTypeDef | HAL_SPI_Transmit (SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout) |
Transmit an amount of data in blocking mode. More... | |
HAL_StatusTypeDef | HAL_SPI_FlushRxFifo (SPI_HandleTypeDef *hspi) |
Flush the RX fifo. More... | |
HAL_StatusTypeDef | HAL_SPI_Receive (SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout) |
Receive an amount of data in blocking mode. More... | |
HAL_StatusTypeDef | HAL_SPI_TransmitReceive (SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size, uint32_t Timeout) |
Transmit and Receive an amount of data in blocking mode. More... | |
HAL_StatusTypeDef | HAL_SPI_Transmit_IT (SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size) |
Transmit an amount of data in non-blocking mode with Interrupt. More... | |
HAL_StatusTypeDef | HAL_SPI_Receive_IT (SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size) |
Receive an amount of data in non-blocking mode with Interrupt. More... | |
HAL_StatusTypeDef | HAL_SPI_TransmitReceive_IT (SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size) |
Transmit and Receive an amount of data in non-blocking mode with Interrupt. More... | |
HAL_StatusTypeDef | HAL_SPI_Transmit_DMA (SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size) |
Transmit an amount of data in non-blocking mode with DMA. More... | |
HAL_StatusTypeDef | HAL_SPI_Receive_DMA (SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size) |
Receive an amount of data in non-blocking mode with DMA. More... | |
HAL_StatusTypeDef | HAL_SPI_TransmitReceive_DMA (SPI_HandleTypeDef *hspi, uint8_t *pTxData, uint8_t *pRxData, uint16_t Size) |
Transmit and Receive an amount of data in non-blocking mode with DMA. More... | |
HAL_StatusTypeDef | HAL_SPI_Abort (SPI_HandleTypeDef *hspi) |
Abort ongoing transfer (blocking mode). More... | |
HAL_StatusTypeDef | HAL_SPI_Abort_IT (SPI_HandleTypeDef *hspi) |
Abort ongoing transfer (Interrupt mode). More... | |
HAL_StatusTypeDef | HAL_SPI_DMAPause (SPI_HandleTypeDef *hspi) |
Pause the DMA Transfer. More... | |
HAL_StatusTypeDef | HAL_SPI_DMAResume (SPI_HandleTypeDef *hspi) |
Resume the DMA Transfer. More... | |
HAL_StatusTypeDef | HAL_SPI_DMAStop (SPI_HandleTypeDef *hspi) |
Stop the DMA Transfer. More... | |
void | HAL_SPI_IRQHandler (SPI_HandleTypeDef *hspi) |
Handle SPI interrupt request. More... | |
void | HAL_SPI_TxCpltCallback (SPI_HandleTypeDef *hspi) |
Tx Transfer completed callback. More... | |
void | HAL_SPI_RxCpltCallback (SPI_HandleTypeDef *hspi) |
Rx Transfer completed callback. More... | |
void | HAL_SPI_TxRxCpltCallback (SPI_HandleTypeDef *hspi) |
Tx and Rx Transfer completed callback. More... | |
void | HAL_SPI_TxHalfCpltCallback (SPI_HandleTypeDef *hspi) |
Tx Half Transfer completed callback. More... | |
void | HAL_SPI_RxHalfCpltCallback (SPI_HandleTypeDef *hspi) |
Rx Half Transfer completed callback. More... | |
void | HAL_SPI_TxRxHalfCpltCallback (SPI_HandleTypeDef *hspi) |
Tx and Rx Half Transfer callback. More... | |
void | HAL_SPI_ErrorCallback (SPI_HandleTypeDef *hspi) |
SPI error callback. More... | |
void | HAL_SPI_AbortCpltCallback (SPI_HandleTypeDef *hspi) |
SPI Abort Complete callback. More... | |
Data transfers functions.
SPI_Exported_Functions_Group1
============================================================================== ##### IO operation functions ##### =============================================================================== [..] This subsection provides a set of functions allowing to manage the SPI data transfers. [..] The SPI supports master and slave mode : (#) There are two modes of transfer: (++) Blocking mode: The communication is performed in polling mode. The HAL status of all data processing is returned by the same function after finishing transfer. (++) No-Blocking mode: The communication is performed using Interrupts or DMA, These APIs return the HAL status. The end of the data processing will be indicated through the dedicated SPI IRQ when using Interrupt mode or the DMA IRQ when using DMA mode. The HAL_SPI_TxCpltCallback(), HAL_SPI_RxCpltCallback() and HAL_SPI_TxRxCpltCallback() user callbacks will be executed respectively at the end of the transmit or Receive process The HAL_SPI_ErrorCallback()user callback will be executed when a communication error is detected (#) APIs provided for these 2 transfer modes (Blocking mode or Non blocking mode using either Interrupt or DMA) exist for 1Line (simplex) and 2Lines (full duplex) modes.
HAL_StatusTypeDef HAL_SPI_Abort | ( | SPI_HandleTypeDef * | hspi | ) |
Abort ongoing transfer (blocking mode).
hspi | SPI handle. |
HAL | status |
HAL_StatusTypeDef HAL_SPI_Abort_IT | ( | SPI_HandleTypeDef * | hspi | ) |
Abort ongoing transfer (Interrupt mode).
hspi | SPI handle. |
HAL | status |
void HAL_SPI_AbortCpltCallback | ( | SPI_HandleTypeDef * | hspi | ) |
SPI Abort Complete callback.
hspi | SPI handle. |
None |
HAL_StatusTypeDef HAL_SPI_DMAPause | ( | SPI_HandleTypeDef * | hspi | ) |
Pause the DMA Transfer.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for the specified SPI module. |
HAL | status |
HAL_StatusTypeDef HAL_SPI_DMAResume | ( | SPI_HandleTypeDef * | hspi | ) |
Resume the DMA Transfer.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for the specified SPI module. |
HAL | status |
HAL_StatusTypeDef HAL_SPI_DMAStop | ( | SPI_HandleTypeDef * | hspi | ) |
Stop the DMA Transfer.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for the specified SPI module. |
HAL | status |
void HAL_SPI_ErrorCallback | ( | SPI_HandleTypeDef * | hspi | ) |
SPI error callback.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
None |
HAL_StatusTypeDef HAL_SPI_FlushRxFifo | ( | SPI_HandleTypeDef * | hspi | ) |
Flush the RX fifo.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for the specified SPI module. |
HAL | status |
void HAL_SPI_IRQHandler | ( | SPI_HandleTypeDef * | hspi | ) |
Handle SPI interrupt request.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for the specified SPI module. |
None |
HAL_StatusTypeDef HAL_SPI_Receive | ( | SPI_HandleTypeDef * | hspi, |
uint8_t * | pData, | ||
uint16_t | Size, | ||
uint32_t | Timeout | ||
) |
Receive an amount of data in blocking mode.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
pData | pointer to data buffer |
Size | amount of data to be received |
Timeout | Timeout duration |
HAL | status |
HAL_StatusTypeDef HAL_SPI_Receive_DMA | ( | SPI_HandleTypeDef * | hspi, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Receive an amount of data in non-blocking mode with DMA.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
pData | pointer to data buffer |
Size | amount of data to be sent |
HAL | status |
HAL_StatusTypeDef HAL_SPI_Receive_IT | ( | SPI_HandleTypeDef * | hspi, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Receive an amount of data in non-blocking mode with Interrupt.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
pData | pointer to data buffer |
Size | amount of data to be sent |
HAL | status |
void HAL_SPI_RxCpltCallback | ( | SPI_HandleTypeDef * | hspi | ) |
Rx Transfer completed callback.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
None |
void HAL_SPI_RxHalfCpltCallback | ( | SPI_HandleTypeDef * | hspi | ) |
Rx Half Transfer completed callback.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
None |
HAL_StatusTypeDef HAL_SPI_Transmit | ( | SPI_HandleTypeDef * | hspi, |
uint8_t * | pData, | ||
uint16_t | Size, | ||
uint32_t | Timeout | ||
) |
Transmit an amount of data in blocking mode.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
pData | pointer to data buffer |
Size | amount of data to be sent |
Timeout | Timeout duration |
HAL | status |
HAL_StatusTypeDef HAL_SPI_Transmit_DMA | ( | SPI_HandleTypeDef * | hspi, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Transmit an amount of data in non-blocking mode with DMA.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
pData | pointer to data buffer |
Size | amount of data to be sent |
HAL | status |
HAL_StatusTypeDef HAL_SPI_Transmit_IT | ( | SPI_HandleTypeDef * | hspi, |
uint8_t * | pData, | ||
uint16_t | Size | ||
) |
Transmit an amount of data in non-blocking mode with Interrupt.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
pData | pointer to data buffer |
Size | amount of data to be sent |
HAL | status |
HAL_StatusTypeDef HAL_SPI_TransmitReceive | ( | SPI_HandleTypeDef * | hspi, |
uint8_t * | pTxData, | ||
uint8_t * | pRxData, | ||
uint16_t | Size, | ||
uint32_t | Timeout | ||
) |
Transmit and Receive an amount of data in blocking mode.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
pTxData | pointer to transmission data buffer |
pRxData | pointer to reception data buffer |
Size | amount of data to be sent and received |
Timeout | Timeout duration |
HAL | status |
HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA | ( | SPI_HandleTypeDef * | hspi, |
uint8_t * | pTxData, | ||
uint8_t * | pRxData, | ||
uint16_t | Size | ||
) |
Transmit and Receive an amount of data in non-blocking mode with DMA.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
pTxData | pointer to transmission data buffer |
pRxData | pointer to reception data buffer |
Size | amount of data to be sent |
HAL | status |
HAL_StatusTypeDef HAL_SPI_TransmitReceive_IT | ( | SPI_HandleTypeDef * | hspi, |
uint8_t * | pTxData, | ||
uint8_t * | pRxData, | ||
uint16_t | Size | ||
) |
Transmit and Receive an amount of data in non-blocking mode with Interrupt.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
pTxData | pointer to transmission data buffer |
pRxData | pointer to reception data buffer |
Size | amount of data to be sent and received |
HAL | status |
void HAL_SPI_TxCpltCallback | ( | SPI_HandleTypeDef * | hspi | ) |
Tx Transfer completed callback.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
None |
void HAL_SPI_TxHalfCpltCallback | ( | SPI_HandleTypeDef * | hspi | ) |
Tx Half Transfer completed callback.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
None |
void HAL_SPI_TxRxCpltCallback | ( | SPI_HandleTypeDef * | hspi | ) |
Tx and Rx Transfer completed callback.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
None |
void HAL_SPI_TxRxHalfCpltCallback | ( | SPI_HandleTypeDef * | hspi | ) |
Tx and Rx Half Transfer callback.
hspi | pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. |
None |