Hal Drivers for L4
Dependents: BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo
Fork of STM32L4xx_HAL_Driver 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 1594 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 1614 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 1634 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 1807 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 1665 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 543 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 1343 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 1048 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 1742 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 1781 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 396 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 1248 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 971 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 754 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 1450 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 1150 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 1729 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 1768 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 1755 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 1794 of file stm32l4xx_hal_spi.c.
Generated on Tue Jul 12 2022 11:35:31 by 1.7.2