Functions
Initialization and de-initialization functions
Peripheral Driver » HAL Driver » UART » Functions

Initialization and de-initialization functions. More...

## Functions
hal_status_t | hal_uart_init (uart_handle_t *p_uart)
| Initialize the UART according to the specified parameters in the uart_init_t and initialize the associated handle. More...
hal_status_t | hal_uart_deinit (uart_handle_t *p_uart)
| De-initialize the UART peripheral. More...
void | hal_uart_msp_init (uart_handle_t *p_uart)
| Initialize the UART MSP. More...
void | hal_uart_msp_deinit (uart_handle_t *p_uart)
| De-initialize the UART MSP. More...

## Detailed Description

Initialization and de-initialization functions.

    ===============================================================================
                ##### Initialization and de-initialization functions #####
     ===============================================================================
        [..]
        This subsection provides a set of functions allowing to initialize the UARTx.
          (+) For the asynchronous mode the parameters below can be configured:
            (++) Baud Rate
            (++) Data Bit
            (++) Stop Bit
            (++) Parity
            (++) Hardware flow control
        [..]
        The hal_uart_init() API follow the UART asynchronous configuration procedures.

## Function Documentation

## ◆ hal_uart_deinit()

hal_status_t hal_uart_deinit | ( | uart_handle_t * | p_uart | ) |

De-initialize the UART peripheral.

Parameters

  [in] | p_uart | Pointer to a UART handle which contains the configuration information for the specified UART module.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_uart_init()

hal_status_t hal_uart_init | ( | uart_handle_t * | p_uart | ) |

Initialize the UART according to the specified parameters in the uart_init_t and initialize the associated handle.

Parameters

  [in] | p_uart | Pointer to a UART handle which contains the configuration information for the specified UART module.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_uart_msp_deinit()

void hal_uart_msp_deinit | ( | uart_handle_t * | p_uart | ) |

De-initialize the UART MSP.

Note
  This function should not be modified. When the callback is needed, the hal_uart_msp_deinit can be implemented in the user file.

Parameters

  [in] | p_uart | Pointer to a UART handle which contains the configuration information for the specified UART module.

## ◆ hal_uart_msp_init()

void hal_uart_msp_init | ( | uart_handle_t * | p_uart | ) |

Initialize the UART MSP.

Note
  This function should not be modified. When the callback is needed, the hal_uart_msp_init can be implemented in the user file.

Parameters

  [in] | p_uart | Pointer to a UART handle which contains the configuration information for the specified UART module.