UART control functions.
More...
UART control functions.
===============================================================================
##### Peripheral Control functions #####
===============================================================================
[..]
This subsection provides a set of functions allowing to control the UART.
(+) HAL_MultiProcessor_EnableMuteMode() API enables mute mode
(+) HAL_MultiProcessor_DisableMuteMode() API disables mute mode
(+) HAL_MultiProcessor_EnterMuteMode() API enters mute mode
(+) UART_SetConfig() API configures the UART peripheral
(+) UART_AdvFeatureConfig() API optionally configures the UART advanced features
(+) UART_CheckIdleState() API ensures that TEACK and/or REACK are set after initialization
(+) HAL_HalfDuplex_EnableTransmitter() API disables receiver and enables transmitter
(+) HAL_HalfDuplex_EnableReceiver() API disables transmitter and enables receiver
(+) HAL_LIN_SendBreak() API transmits the break characters
◆ HAL_HalfDuplex_EnableReceiver()
Enable the UART receiver and disable the UART transmitter.
- Parameters
-
- Return values
-
Definition at line 2719 of file stm32l4xx_hal_uart.c.
2722 huart->
gState = HAL_UART_STATE_BUSY;
2728 SET_BIT(huart->
Instance->CR1, USART_CR1_RE);
2730 huart->
gState = HAL_UART_STATE_READY;
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
__IO HAL_UART_StateTypeDef gState
◆ HAL_HalfDuplex_EnableTransmitter()
Enable the UART transmitter and disable the UART receiver.
- Parameters
-
- Return values
-
Definition at line 2696 of file stm32l4xx_hal_uart.c.
2699 huart->
gState = HAL_UART_STATE_BUSY;
2705 SET_BIT(huart->
Instance->CR1, USART_CR1_TE);
2707 huart->
gState = HAL_UART_STATE_READY;
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
__IO HAL_UART_StateTypeDef gState
◆ HAL_LIN_SendBreak()
Transmit break characters.
- Parameters
-
- Return values
-
Definition at line 2743 of file stm32l4xx_hal_uart.c.
2750 huart->
gState = HAL_UART_STATE_BUSY;
2753 __HAL_UART_SEND_REQ(huart, UART_SENDBREAK_REQUEST);
2755 huart->
gState = HAL_UART_STATE_READY;
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))
__IO HAL_UART_StateTypeDef gState
◆ HAL_MultiProcessor_DisableMuteMode()
Disable UART mute mode (does not mean the UART actually exits mute mode as it may not have been in mute mode at this very moment).
- Parameters
-
- Return values
-
Definition at line 2666 of file stm32l4xx_hal_uart.c.
2670 huart->
gState = HAL_UART_STATE_BUSY;
2675 huart->
gState = HAL_UART_STATE_READY;
HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart)
Check the UART Idle State.
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)
__IO HAL_UART_StateTypeDef gState
◆ HAL_MultiProcessor_EnableMuteMode()
Enable UART in mute mode (does not mean UART enters mute mode; to enter mute mode, HAL_MultiProcessor_EnterMuteMode() API must be called).
- Parameters
-
- Return values
-
Definition at line 2646 of file stm32l4xx_hal_uart.c.
2650 huart->
gState = HAL_UART_STATE_BUSY;
2653 SET_BIT(huart->
Instance->CR1, USART_CR1_MME);
2655 huart->
gState = HAL_UART_STATE_READY;
HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart)
Check the UART Idle State.
__IO HAL_UART_StateTypeDef gState
◆ HAL_MultiProcessor_EnterMuteMode()