STM32L4xx_HAL_Driver  1.14.0
Peripheral State and Errors functions

SPI control functions. More...

Functions

HAL_SPI_StateTypeDef HAL_SPI_GetState (SPI_HandleTypeDef *hspi)
 Return the SPI handle state. More...
 
uint32_t HAL_SPI_GetError (SPI_HandleTypeDef *hspi)
 Return the SPI error code. More...
 

Detailed Description

SPI control functions.

 ===============================================================================
                      ##### Peripheral State and Errors functions #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to control the SPI.
     (+) HAL_SPI_GetState() API can be helpful to check in run-time the state of the SPI peripheral
     (+) HAL_SPI_GetError() check in run-time Errors occurring during communication

Function Documentation

◆ HAL_SPI_GetError()

uint32_t HAL_SPI_GetError ( SPI_HandleTypeDef hspi)

Return the SPI error code.

Parameters
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values
SPIerror code in bitmap format

Definition at line 2916 of file stm32l4xx_hal_spi.c.

2917 {
2918  /* Return SPI ErrorCode */
2919  return hspi->ErrorCode;
2920 }

◆ HAL_SPI_GetState()

HAL_SPI_StateTypeDef HAL_SPI_GetState ( SPI_HandleTypeDef hspi)

Return the SPI handle state.

Parameters
hspipointer to a SPI_HandleTypeDef structure that contains the configuration information for SPI module.
Return values
SPIstate

Definition at line 2904 of file stm32l4xx_hal_spi.c.

2905 {
2906  /* Return SPI handle state */
2907  return hspi->State;
2908 }
__IO HAL_SPI_StateTypeDef State