Peripheral Control and State functions

UART Peripheral State functions. More...

Functions

hal_uart_state_t hal_uart_get_state (uart_handle_t *p_uart)
 Return the UART handle state. More...
 
uint32_t hal_uart_get_error (uart_handle_t *p_uart)
 Return the UART handle error code. More...
 
hal_status_t hal_uart_suspend_reg (uart_handle_t *p_uart)
 Suspend some registers related to UART configuration before sleep. More...
 
hal_status_t hal_uart_resume_reg (uart_handle_t *p_uart)
 Restore some registers related to UART configuration after sleep. This function must be used in conjunction with the hal_uart_suspend_reg(). More...
 

Detailed Description

UART Peripheral State functions.

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

Function Documentation

◆ hal_uart_get_error()

uint32_t hal_uart_get_error ( uart_handle_t p_uart)

Return the UART handle error code.

Parameters
[in]p_uartPointer to a UART handle which contains the configuration information for the specified UART module.
Returns
UART Error Code

◆ hal_uart_get_state()

hal_uart_state_t hal_uart_get_state ( uart_handle_t p_uart)

Return the UART handle state.

Parameters
[in]p_uartPointer to a UART handle which contains the configuration information for the specified UART module.
Return values
HAL_UART_STATE_RESETPeripheral is not initialized.
HAL_UART_STATE_READYPeripheral initialized and ready for use.
HAL_UART_STATE_BUSYAn internal process is ongoing.
HAL_UART_STATE_BUSY_TXData Transmission process is ongoing.
HAL_UART_STATE_BUSY_RXData Reception process is ongoing.
HAL_UART_STATE_TIMEOUTTimeout state.
HAL_UART_STATE_ERRORError.

◆ hal_uart_resume_reg()

hal_status_t hal_uart_resume_reg ( uart_handle_t p_uart)

Restore some registers related to UART configuration after sleep. This function must be used in conjunction with the hal_uart_suspend_reg().

Parameters
[in]p_uartPointer to a UART handle which contains the configuration information for the specified UART module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_uart_suspend_reg()

hal_status_t hal_uart_suspend_reg ( uart_handle_t p_uart)

Suspend some registers related to UART configuration before sleep.

Parameters
[in]p_uartPointer to a UART handle which contains the configuration information for the specified UART module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.