STM32L4xx_HAL_Driver  1.14.0
Peripheral State and Error functions

USART Peripheral State and Error functions. More...

Functions

HAL_USART_StateTypeDef HAL_USART_GetState (USART_HandleTypeDef *husart)
 Return the USART handle state. More...
 
uint32_t HAL_USART_GetError (USART_HandleTypeDef *husart)
 Return the USART error code. More...
 

Detailed Description

USART Peripheral State and Error functions.

  ==============================================================================
            ##### Peripheral State and Error functions #####
  ==============================================================================
    [..]
    This subsection provides functions allowing to :
      (+) Return the USART handle state
      (+) Return the USART handle error code

Function Documentation

◆ HAL_USART_GetError()

uint32_t HAL_USART_GetError ( USART_HandleTypeDef husart)

Return the USART error code.

Parameters
husartpointer to a USART_HandleTypeDef structure that contains the configuration information for the specified USART.
Return values
USARThandle Error Code

Definition at line 2523 of file stm32l4xx_hal_usart.c.

2524 {
2525  return husart->ErrorCode;
2526 }

◆ HAL_USART_GetState()

HAL_USART_StateTypeDef HAL_USART_GetState ( USART_HandleTypeDef husart)

Return the USART handle state.

Parameters
husartpointer to a USART_HandleTypeDef structure that contains the configuration information for the specified USART.
Return values
USARThandle state

Definition at line 2512 of file stm32l4xx_hal_usart.c.

2513 {
2514  return husart->State;
2515 }
__IO HAL_USART_StateTypeDef State