STM32L486xx HAL User Manual
|
Defines | |
#define | __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) |
Reset UART handle states. | |
#define | __HAL_UART_FLUSH_DRREGISTER(__HANDLE__) |
Flush the UART Data registers. | |
#define | __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ICR = (__FLAG__)) |
Clear the specified UART pending flag. | |
#define | __HAL_UART_CLEAR_PEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_PEF) |
Clear the UART PE pending flag. | |
#define | __HAL_UART_CLEAR_FEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_FEF) |
Clear the UART FE pending flag. | |
#define | __HAL_UART_CLEAR_NEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_NEF) |
Clear the UART NE pending flag. | |
#define | __HAL_UART_CLEAR_OREFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_OREF) |
Clear the UART ORE pending flag. | |
#define | __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__) __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_IDLEF) |
Clear the UART IDLE pending flag. | |
#define | __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__)) |
Check whether the specified UART flag is set or not. | |
#define | __HAL_UART_ENABLE_IT(__HANDLE__, __INTERRUPT__) |
Enable the specified UART interrupt. | |
#define | __HAL_UART_DISABLE_IT(__HANDLE__, __INTERRUPT__) |
Disable the specified UART interrupt. | |
#define | __HAL_UART_GET_IT(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->ISR & (1U << ((__INTERRUPT__)>> 8U))) != RESET) ? SET : RESET) |
Check whether the specified UART interrupt has occurred or not. | |
#define | __HAL_UART_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) |
Check whether the specified UART interrupt source is enabled or not. | |
#define | __HAL_UART_CLEAR_IT(__HANDLE__, __IT_CLEAR__) ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__)) |
Clear the specified UART ISR flag, in setting the proper ICR register flag. | |
#define | __HAL_UART_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->Instance->RQR |= (__REQ__)) |
Set a specific UART request flag. | |
#define | __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT) |
Enable the UART one bit sample method. | |
#define | __HAL_UART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= ~USART_CR3_ONEBIT) |
Disable the UART one bit sample method. | |
#define | __HAL_UART_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE) |
Enable UART. | |
#define | __HAL_UART_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE) |
Disable UART. | |
#define | __HAL_UART_HWCONTROL_CTS_ENABLE(__HANDLE__) |
Enable CTS flow control. | |
#define | __HAL_UART_HWCONTROL_CTS_DISABLE(__HANDLE__) |
Disable CTS flow control. | |
#define | __HAL_UART_HWCONTROL_RTS_ENABLE(__HANDLE__) |
Enable RTS flow control. | |
#define | __HAL_UART_HWCONTROL_RTS_DISABLE(__HANDLE__) |
Disable RTS flow control. |
#define __HAL_UART_CLEAR_FEFLAG | ( | __HANDLE__ | ) | __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_FEF) |
Clear the UART FE pending flag.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 881 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_CLEAR_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | ((__HANDLE__)->Instance->ICR = (__FLAG__)) |
Clear the specified UART pending flag.
__HANDLE__ | specifies the UART Handle. |
__FLAG__ | specifies the flag to check. This parameter can be any combination of the following values:
|
None |
Definition at line 869 of file stm32l4xx_hal_uart.h.
Referenced by HAL_UART_Abort(), HAL_UART_Abort_IT(), HAL_UART_AbortReceive(), HAL_UART_AbortReceive_IT(), HAL_UART_DMAResume(), HAL_UART_IRQHandler(), HAL_UART_Transmit_DMA(), UART_DMARxAbortCallback(), UART_DMARxOnlyAbortCallback(), and UART_DMATxAbortCallback().
#define __HAL_UART_CLEAR_IDLEFLAG | ( | __HANDLE__ | ) | __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_IDLEF) |
Clear the UART IDLE pending flag.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 899 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_CLEAR_IT | ( | __HANDLE__, | |
__IT_CLEAR__ | |||
) | ((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__)) |
Clear the specified UART ISR flag, in setting the proper ICR register flag.
__HANDLE__ | specifies the UART Handle. |
__IT_CLEAR__ | specifies the interrupt clear register flag that needs to be set to clear the corresponding interrupt This parameter can be one of the following values:
|
None |
Definition at line 1063 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_CLEAR_NEFLAG | ( | __HANDLE__ | ) | __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_NEF) |
Clear the UART NE pending flag.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 887 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_CLEAR_OREFLAG | ( | __HANDLE__ | ) | __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_OREF) |
Clear the UART ORE pending flag.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 893 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_CLEAR_PEFLAG | ( | __HANDLE__ | ) | __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_PEF) |
Clear the UART PE pending flag.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 875 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_DISABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE) |
Disable UART.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 1100 of file stm32l4xx_hal_uart.h.
Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), HAL_MultiProcessorEx_AddressLength_Set(), HAL_RS485Ex_Init(), HAL_UART_DeInit(), HAL_UART_Init(), and HAL_UARTEx_StopModeWakeUpSourceConfig().
#define __HAL_UART_DISABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) |
(((((uint8_t)(__INTERRUPT__)) >> 5U) == 1U)? ((__HANDLE__)->Instance->CR1 &= ~ (1U << ((__INTERRUPT__) & UART_IT_MASK))): \ ((((uint8_t)(__INTERRUPT__)) >> 5U) == 2U)? ((__HANDLE__)->Instance->CR2 &= ~ (1U << ((__INTERRUPT__) & UART_IT_MASK))): \ ((__HANDLE__)->Instance->CR3 &= ~ (1U << ((__INTERRUPT__) & UART_IT_MASK))))
Disable the specified UART interrupt.
__HANDLE__ | specifies the UART Handle. |
__INTERRUPT__ | specifies the UART interrupt source to disable. This parameter can be one of the following values:
|
None |
Definition at line 991 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE) |
Enable UART.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 1094 of file stm32l4xx_hal_uart.h.
Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), HAL_MultiProcessorEx_AddressLength_Set(), HAL_RS485Ex_Init(), HAL_UART_Init(), and HAL_UARTEx_StopModeWakeUpSourceConfig().
#define __HAL_UART_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) |
(((((uint8_t)(__INTERRUPT__)) >> 5U) == 1U)? ((__HANDLE__)->Instance->CR1 |= (1U << ((__INTERRUPT__) & UART_IT_MASK))): \ ((((uint8_t)(__INTERRUPT__)) >> 5U) == 2U)? ((__HANDLE__)->Instance->CR2 |= (1U << ((__INTERRUPT__) & UART_IT_MASK))): \ ((__HANDLE__)->Instance->CR3 |= (1U << ((__INTERRUPT__) & UART_IT_MASK))))
Enable the specified UART interrupt.
__HANDLE__ | specifies the UART Handle. |
__INTERRUPT__ | specifies the UART interrupt source to enable. This parameter can be one of the following values:
|
None |
Definition at line 964 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_FLUSH_DRREGISTER | ( | __HANDLE__ | ) |
do{ \ SET_BIT((__HANDLE__)->Instance->RQR, UART_RXDATA_FLUSH_REQUEST); \ SET_BIT((__HANDLE__)->Instance->RQR, UART_TXDATA_FLUSH_REQUEST); \ } while(0U)
Flush the UART Data registers.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 846 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_GET_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__)) |
Check whether the specified UART flag is set or not.
__HANDLE__ | specifies the UART Handle. |
__FLAG__ | specifies the flag to check. This parameter can be one of the following values:
|
The | new state of __FLAG__ (TRUE or FALSE). |
Definition at line 940 of file stm32l4xx_hal_uart.h.
Referenced by UART_WaitOnFlagUntilTimeout().
#define __HAL_UART_GET_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((((__HANDLE__)->Instance->ISR & (1U << ((__INTERRUPT__)>> 8U))) != RESET) ? SET : RESET) |
Check whether the specified UART interrupt has occurred or not.
__HANDLE__ | specifies the UART Handle. |
__INTERRUPT__ | specifies the UART interrupt to check. This parameter can be one of the following values:
|
The | new state of __INTERRUPT__ (SET or RESET). |
Definition at line 1017 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_GET_IT_SOURCE | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) |
((((((((uint8_t)(__INTERRUPT__)) >> 5U) == 1U) ? (__HANDLE__)->Instance->CR1 : \ (((((uint8_t)(__INTERRUPT__)) >> 5U) == 2U) ? (__HANDLE__)->Instance->CR2 : \ (__HANDLE__)->Instance->CR3)) & (1U << (((uint16_t)(__INTERRUPT__)) & UART_IT_MASK))) != RESET) ? SET : RESET)
Check whether the specified UART interrupt source is enabled or not.
__HANDLE__ | specifies the UART Handle. |
__INTERRUPT__ | specifies the UART interrupt source to check. This parameter can be one of the following values:
|
The | new state of __INTERRUPT__ (SET or RESET). |
Definition at line 1041 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_HWCONTROL_CTS_DISABLE | ( | __HANDLE__ | ) |
do{ \ CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \ (__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_CTSE); \ } while(0U)
Disable CTS flow control.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 1132 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_HWCONTROL_CTS_ENABLE | ( | __HANDLE__ | ) |
do{ \ SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \ (__HANDLE__)->Init.HwFlowCtl |= USART_CR3_CTSE; \ } while(0U)
Enable CTS flow control.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 1114 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_HWCONTROL_RTS_DISABLE | ( | __HANDLE__ | ) |
do{ \ CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE);\ (__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_RTSE); \ } while(0U)
Disable RTS flow control.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 1168 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_HWCONTROL_RTS_ENABLE | ( | __HANDLE__ | ) |
do{ \ SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE); \ (__HANDLE__)->Init.HwFlowCtl |= USART_CR3_RTSE; \ } while(0U)
Enable RTS flow control.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 1150 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR3 &= ~USART_CR3_ONEBIT) |
Disable the UART one bit sample method.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 1088 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT) |
Enable the UART one bit sample method.
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 1082 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_RESET_HANDLE_STATE | ( | __HANDLE__ | ) |
do{ \ (__HANDLE__)->gState = HAL_UART_STATE_RESET; \ (__HANDLE__)->RxState = HAL_UART_STATE_RESET; \ (__HANDLE__)->MspInitCallback = NULL; \ (__HANDLE__)->MspDeInitCallback = NULL; \ } while(0U)
Reset UART handle states.
__HANDLE__ | UART handle. |
None |
Definition at line 829 of file stm32l4xx_hal_uart.h.
#define __HAL_UART_SEND_REQ | ( | __HANDLE__, | |
__REQ__ | |||
) | ((__HANDLE__)->Instance->RQR |= (__REQ__)) |
Set a specific UART request flag.
__HANDLE__ | specifies the UART Handle. |
__REQ__ | specifies the request flag to set This parameter can be one of the following values:
|
None |
Definition at line 1076 of file stm32l4xx_hal_uart.h.
Referenced by HAL_MultiProcessor_EnterMuteMode(), HAL_UART_Abort(), HAL_UART_Abort_IT(), HAL_UART_AbortReceive(), HAL_UART_AbortReceive_IT(), HAL_UART_AbortTransmit(), HAL_UART_AbortTransmit_IT(), UART_DMARxAbortCallback(), UART_DMARxOnlyAbortCallback(), UART_DMATxAbortCallback(), UART_DMATxOnlyAbortCallback(), UART_RxISR_16BIT(), and UART_RxISR_8BIT().