STM32L4xx_HAL_Driver  1.14.0
Peripheral State and Error functions

UART Peripheral State functions. More...

Functions

HAL_UART_StateTypeDef HAL_UART_GetState (UART_HandleTypeDef *huart)
 Return the UART handle state. More...
 
uint32_t HAL_UART_GetError (UART_HandleTypeDef *huart)
 Return the UART handle error code. More...
 

Detailed Description

UART Peripheral State functions.

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

Function Documentation

◆ HAL_UART_GetError()

uint32_t HAL_UART_GetError ( UART_HandleTypeDef huart)

Return the UART handle error code.

Parameters
huartPointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART.
Return values
UARTError Code

Definition at line 2804 of file stm32l4xx_hal_uart.c.

2805 {
2806  return huart->ErrorCode;
2807 }

◆ HAL_UART_GetState()

HAL_UART_StateTypeDef HAL_UART_GetState ( UART_HandleTypeDef huart)

Return the UART handle state.

Parameters
huartPointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART.
Return values
HALstate

Definition at line 2788 of file stm32l4xx_hal_uart.c.

2789 {
2790  uint32_t temp1;
2791  uint32_t temp2;
2792  temp1 = huart->gState;
2793  temp2 = huart->RxState;
2794 
2795  return (HAL_UART_StateTypeDef)(temp1 | temp2);
2796 }
__IO HAL_UART_StateTypeDef RxState
uint32_t HAL_UART_StateTypeDef
HAL UART State definition.
__IO HAL_UART_StateTypeDef gState