Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TUKS-COURSE-TIMER by
IO operation functions
[SPI Exported Functions]
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
HAL_StatusTypeDef | HAL_SPI_DMAPause (SPI_HandleTypeDef *hspi) |
Pause the DMA Transfer. | |
HAL_StatusTypeDef | HAL_SPI_DMAResume (SPI_HandleTypeDef *hspi) |
Resume the DMA Transfer. | |
HAL_StatusTypeDef | HAL_SPI_DMAStop (SPI_HandleTypeDef *hspi) |
Stop the DMA Transfer. | |
void | HAL_SPI_IRQHandler (SPI_HandleTypeDef *hspi) |
Handle SPI interrupt request. | |
__weak void | HAL_SPI_TxCpltCallback (SPI_HandleTypeDef *hspi) |
Tx Transfer completed callback. | |
__weak void | HAL_SPI_RxCpltCallback (SPI_HandleTypeDef *hspi) |
Rx Transfer completed callback. | |
__weak void | HAL_SPI_TxRxCpltCallback (SPI_HandleTypeDef *hspi) |
Tx and Rx Transfer completed callback. | |
__weak void | HAL_SPI_TxHalfCpltCallback (SPI_HandleTypeDef *hspi) |
Tx Half Transfer completed callback. | |
__weak void | HAL_SPI_RxHalfCpltCallback (SPI_HandleTypeDef *hspi) |
Rx Half Transfer completed callback. | |
__weak void | HAL_SPI_TxRxHalfCpltCallback (SPI_HandleTypeDef *hspi) |
Tx and Rx Half Transfer callback. | |
__weak void | HAL_SPI_ErrorCallback (SPI_HandleTypeDef *hspi) |
SPI error callback. |
Detailed Description
Data transfers functions.
============================================================================== ##### 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.
Function Documentation
HAL_StatusTypeDef HAL_SPI_DMAPause | ( | SPI_HandleTypeDef * | hspi ) |
Pause the DMA Transfer.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for the specified SPI module.
- Return values:
-
HAL status
Definition at line 1599 of file stm32l4xx_hal_spi.c.
HAL_StatusTypeDef HAL_SPI_DMAResume | ( | SPI_HandleTypeDef * | hspi ) |
Resume the DMA Transfer.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for the specified SPI module.
- Return values:
-
HAL status
Definition at line 1619 of file stm32l4xx_hal_spi.c.
HAL_StatusTypeDef HAL_SPI_DMAStop | ( | SPI_HandleTypeDef * | hspi ) |
Stop the DMA Transfer.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for the specified SPI module.
- Return values:
-
HAL status
Definition at line 1639 of file stm32l4xx_hal_spi.c.
__weak void HAL_SPI_ErrorCallback | ( | SPI_HandleTypeDef * | hspi ) |
SPI error callback.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
- Return values:
-
None
Definition at line 1830 of file stm32l4xx_hal_spi.c.
void HAL_SPI_IRQHandler | ( | SPI_HandleTypeDef * | hspi ) |
Handle SPI interrupt request.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for the specified SPI module.
- Return values:
-
None
Definition at line 1670 of file stm32l4xx_hal_spi.c.
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.
- Parameters:
-
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
- Return values:
-
HAL status
Definition at line 549 of file stm32l4xx_hal_spi.c.
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.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module. pData,: pointer to data buffer
- Note:
- When the CRC feature is enabled the pData Length must be Size + 1.
- Parameters:
-
Size,: amount of data to be sent
- Return values:
-
HAL status
Definition at line 1349 of file stm32l4xx_hal_spi.c.
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.
- Parameters:
-
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
- Return values:
-
HAL status
Definition at line 1054 of file stm32l4xx_hal_spi.c.
__weak void HAL_SPI_RxCpltCallback | ( | SPI_HandleTypeDef * | hspi ) |
Rx Transfer completed callback.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
- Return values:
-
None
Definition at line 1750 of file stm32l4xx_hal_spi.c.
__weak void HAL_SPI_RxHalfCpltCallback | ( | SPI_HandleTypeDef * | hspi ) |
Rx Half Transfer completed callback.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
- Return values:
-
None
Definition at line 1798 of file stm32l4xx_hal_spi.c.
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.
- Parameters:
-
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
- Return values:
-
HAL status
Definition at line 402 of file stm32l4xx_hal_spi.c.
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.
- Parameters:
-
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
- Return values:
-
HAL status
Definition at line 1254 of file stm32l4xx_hal_spi.c.
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.
- Parameters:
-
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
- Return values:
-
HAL status
Definition at line 977 of file stm32l4xx_hal_spi.c.
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.
- Parameters:
-
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
- Return values:
-
HAL status
Definition at line 760 of file stm32l4xx_hal_spi.c.
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.
- Parameters:
-
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
- Note:
- When the CRC feature is enabled the pRxData Length must be Size + 1
- Parameters:
-
Size,: amount of data to be sent
- Return values:
-
HAL status
Definition at line 1456 of file stm32l4xx_hal_spi.c.
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.
- Parameters:
-
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
- Return values:
-
HAL status
Definition at line 1156 of file stm32l4xx_hal_spi.c.
__weak void HAL_SPI_TxCpltCallback | ( | SPI_HandleTypeDef * | hspi ) |
Tx Transfer completed callback.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
- Return values:
-
None
Definition at line 1734 of file stm32l4xx_hal_spi.c.
__weak void HAL_SPI_TxHalfCpltCallback | ( | SPI_HandleTypeDef * | hspi ) |
Tx Half Transfer completed callback.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
- Return values:
-
None
Definition at line 1782 of file stm32l4xx_hal_spi.c.
__weak void HAL_SPI_TxRxCpltCallback | ( | SPI_HandleTypeDef * | hspi ) |
Tx and Rx Transfer completed callback.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
- Return values:
-
None
Definition at line 1766 of file stm32l4xx_hal_spi.c.
__weak void HAL_SPI_TxRxHalfCpltCallback | ( | SPI_HandleTypeDef * | hspi ) |
Tx and Rx Half Transfer callback.
- Parameters:
-
hspi,: pointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
- Return values:
-
None
Definition at line 1814 of file stm32l4xx_hal_spi.c.
Generated on Tue Jul 12 2022 17:38:54 by
