STM32G474xx HAL 用户手册
函数
外设状态和错误函数
SPI Exported Functions

SPI控制函数。 更多...

函数

HAL_SPI_StateTypeDef HAL_SPI_GetState (const SPI_HandleTypeDef *hspi)
 返回SPI句柄状态。
uint32_t HAL_SPI_GetError (const SPI_HandleTypeDef *hspi)
 返回SPI错误代码。

详细描述

SPI控制函数。

 ===============================================================================
                      ##### 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

函数文档

uint32_t HAL_SPI_GetError ( const SPI_HandleTypeDef hspi)

返回SPI错误代码。

参数:
hspi指向包含SPI模块配置信息的SPI_HandleTypeDef结构体的指针。
返回值:
SPI按位图格式的错误代码

Definition at line 3020 of file stm32g4xx_hal_spi.c.

References __SPI_HandleTypeDef::ErrorCode.

返回SPI句柄状态。

参数:
hspi指向包含SPI模块配置信息的SPI_HandleTypeDef结构体的指针。
返回值:
SPI状态

Definition at line 3008 of file stm32g4xx_hal_spi.c.

References __SPI_HandleTypeDef::State.