Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Initialization and de-initialization functions
[UART Exported Functions]
Initialization and Configuration functions. More...
Functions | |
| HAL_StatusTypeDef | HAL_UART_Init (UART_HandleTypeDef *huart) |
| Initializes the UART mode according to the specified parameters in the UART_InitTypeDef and create the associated handle. | |
| HAL_StatusTypeDef | HAL_HalfDuplex_Init (UART_HandleTypeDef *huart) |
| Initializes the half-duplex mode according to the specified parameters in the UART_InitTypeDef and create the associated handle. | |
| HAL_StatusTypeDef | HAL_LIN_Init (UART_HandleTypeDef *huart, uint32_t BreakDetectLength) |
| Initializes the LIN mode according to the specified parameters in the UART_InitTypeDef and create the associated handle. | |
| HAL_StatusTypeDef | HAL_MultiProcessor_Init (UART_HandleTypeDef *huart, uint8_t Address, uint32_t WakeUpMethod) |
| Initializes the Multi-Processor mode according to the specified parameters in the UART_InitTypeDef and create the associated handle. | |
| HAL_StatusTypeDef | HAL_UART_DeInit (UART_HandleTypeDef *huart) |
| DeInitializes the UART peripheral. | |
| __weak void | HAL_UART_MspInit (UART_HandleTypeDef *huart) |
| UART MSP Init. | |
| __weak void | HAL_UART_MspDeInit (UART_HandleTypeDef *huart) |
| UART MSP DeInit. | |
Detailed Description
Initialization and Configuration functions.
===============================================================================
##### Initialization and Configuration functions #####
===============================================================================
[..]
This subsection provides a set of functions allowing to initialize the USARTx or the UARTy
in asynchronous mode.
(+) For the asynchronous mode only these parameters can be configured:
(++) Baud Rate
(++) Word Length
(++) Stop Bit
(++) Parity
(++) Hardware flow control
(++) Receiver/transmitter modes
[..]
The HAL_UART_Init(), HAL_HalfDuplex_Init(), HAL_LIN_Init() and HAL_MultiProcessor_Init() APIs
follow respectively the UART asynchronous, UART Half duplex, LIN and Multi-Processor
configuration procedures (details for the procedures are available in reference manuals
(RM0008 for STM32F10Xxx MCUs and RM0041 for STM32F100xx MCUs)).
Function Documentation
| HAL_StatusTypeDef HAL_HalfDuplex_Init | ( | UART_HandleTypeDef * | huart ) |
Initializes the half-duplex mode according to the specified parameters in the UART_InitTypeDef and create the associated handle.
- Parameters:
-
huart,: Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module.
- Return values:
-
HAL status
Definition at line 313 of file stm32f1xx_hal_uart.c.
| HAL_StatusTypeDef HAL_LIN_Init | ( | UART_HandleTypeDef * | huart, |
| uint32_t | BreakDetectLength | ||
| ) |
Initializes the LIN mode according to the specified parameters in the UART_InitTypeDef and create the associated handle.
- Parameters:
-
huart,: Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module. BreakDetectLength,: Specifies the LIN break detection length. This parameter can be one of the following values: - UART_LINBREAKDETECTLENGTH_10B: 10-bit break detection
- UART_LINBREAKDETECTLENGTH_11B: 11-bit break detection
- Return values:
-
HAL status
Definition at line 373 of file stm32f1xx_hal_uart.c.
| HAL_StatusTypeDef HAL_MultiProcessor_Init | ( | UART_HandleTypeDef * | huart, |
| uint8_t | Address, | ||
| uint32_t | WakeUpMethod | ||
| ) |
Initializes the Multi-Processor mode according to the specified parameters in the UART_InitTypeDef and create the associated handle.
- Parameters:
-
huart,: Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module. Address,: UART node address WakeUpMethod,: specifies the UART wakeup method. This parameter can be one of the following values: - UART_WAKEUPMETHOD_IDLELINE: Wakeup by an idle line detection
- UART_WAKEUPMETHOD_ADDRESSMARK: Wakeup by an address mark
- Return values:
-
HAL status
Definition at line 439 of file stm32f1xx_hal_uart.c.
| HAL_StatusTypeDef HAL_UART_DeInit | ( | UART_HandleTypeDef * | huart ) |
DeInitializes the UART peripheral.
- Parameters:
-
huart,: Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module.
- Return values:
-
HAL status
Definition at line 501 of file stm32f1xx_hal_uart.c.
| HAL_StatusTypeDef HAL_UART_Init | ( | UART_HandleTypeDef * | huart ) |
Initializes the UART mode according to the specified parameters in the UART_InitTypeDef and create the associated handle.
- Parameters:
-
huart,: Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module.
- Return values:
-
HAL status
Definition at line 251 of file stm32f1xx_hal_uart.c.
| __weak void HAL_UART_MspDeInit | ( | UART_HandleTypeDef * | huart ) |
UART MSP DeInit.
- Parameters:
-
huart,: Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module.
- Return values:
-
None
Definition at line 554 of file stm32f1xx_hal_uart.c.
| __weak void HAL_UART_MspInit | ( | UART_HandleTypeDef * | huart ) |
UART MSP Init.
- Parameters:
-
huart,: Pointer to a UART_HandleTypeDef structure that contains the configuration information for the specified UART module.
- Return values:
-
None
Definition at line 539 of file stm32f1xx_hal_uart.c.
Generated on Tue Jul 12 2022 15:37:32 by
1.7.2