STM32F439xx HAL User Manual
|
Defines | |
#define | __HAL_UART_RESET_HANDLE_STATE(__HANDLE__) |
Reset UART handle gstate & RxState. | |
#define | __HAL_UART_FLUSH_DRREGISTER(__HANDLE__) ((__HANDLE__)->Instance->DR) |
Flushes the UART DR register. | |
#define | __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__)) |
Checks whether the specified UART flag is set or not. | |
#define | __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__)) |
Clears the specified UART pending flag. | |
#define | __HAL_UART_CLEAR_PEFLAG(__HANDLE__) |
Clear the UART PE pending flag. | |
#define | __HAL_UART_CLEAR_FEFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__) |
Clear the UART FE pending flag. | |
#define | __HAL_UART_CLEAR_NEFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__) |
Clear the UART NE pending flag. | |
#define | __HAL_UART_CLEAR_OREFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__) |
Clear the UART ORE pending flag. | |
#define | __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__) __HAL_UART_CLEAR_PEFLAG(__HANDLE__) |
Clear the UART IDLE pending flag. | |
#define | UART_IT_MASK 0x0000FFFFU |
Enable the specified UART interrupt. | |
#define | __HAL_UART_ENABLE_IT(__HANDLE__, __INTERRUPT__) |
#define | __HAL_UART_DISABLE_IT(__HANDLE__, __INTERRUPT__) |
Disable the specified UART interrupt. | |
#define | __HAL_UART_GET_IT_SOURCE(__HANDLE__, __IT__) |
Checks whether the specified UART interrupt has occurred or not. | |
#define | __HAL_UART_HWCONTROL_CTS_ENABLE(__HANDLE__) |
Enable CTS flow control This macro allows to enable CTS hardware flow control for a given UART instance, without need to call HAL_UART_Init() function. | |
#define | __HAL_UART_HWCONTROL_CTS_DISABLE(__HANDLE__) |
Disable CTS flow control This macro allows to disable CTS hardware flow control for a given UART instance, without need to call HAL_UART_Init() function. | |
#define | __HAL_UART_HWCONTROL_RTS_ENABLE(__HANDLE__) |
Enable RTS flow control This macro allows to enable RTS hardware flow control for a given UART instance, without need to call HAL_UART_Init() function. | |
#define | __HAL_UART_HWCONTROL_RTS_DISABLE(__HANDLE__) |
Disable RTS flow control This macro allows to disable RTS hardware flow control for a given UART instance, without need to call HAL_UART_Init() function. | |
#define | __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT) |
macros to enables the UART's one bit sample method | |
#define | __HAL_UART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR3 &= (uint16_t)~((uint16_t)USART_CR3_ONEBIT)) |
macros to disables the UART's 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_CLEAR_FEFLAG | ( | __HANDLE__ | ) | __HAL_UART_CLEAR_PEFLAG(__HANDLE__) |
Clear the UART FE pending flag.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
None |
Definition at line 434 of file stm32f4xx_hal_uart.h.
#define __HAL_UART_CLEAR_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | ((__HANDLE__)->Instance->SR = ~(__FLAG__)) |
Clears the specified UART pending flag.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
__FLAG__ | specifies the flag to check. This parameter can be any combination of the following values:
|
None |
Definition at line 412 of file stm32f4xx_hal_uart.h.
Referenced by HAL_UART_Transmit_DMA().
#define __HAL_UART_CLEAR_IDLEFLAG | ( | __HANDLE__ | ) | __HAL_UART_CLEAR_PEFLAG(__HANDLE__) |
Clear the UART IDLE pending flag.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
None |
Definition at line 458 of file stm32f4xx_hal_uart.h.
#define __HAL_UART_CLEAR_NEFLAG | ( | __HANDLE__ | ) | __HAL_UART_CLEAR_PEFLAG(__HANDLE__) |
Clear the UART NE pending flag.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
None |
Definition at line 442 of file stm32f4xx_hal_uart.h.
#define __HAL_UART_CLEAR_OREFLAG | ( | __HANDLE__ | ) | __HAL_UART_CLEAR_PEFLAG(__HANDLE__) |
Clear the UART ORE pending flag.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
None |
Definition at line 450 of file stm32f4xx_hal_uart.h.
Referenced by HAL_UART_DMAResume(), and HAL_UART_Receive_DMA().
#define __HAL_UART_CLEAR_PEFLAG | ( | __HANDLE__ | ) |
do{ \ __IO uint32_t tmpreg = 0x00U; \ tmpreg = (__HANDLE__)->Instance->SR; \ tmpreg = (__HANDLE__)->Instance->DR; \ UNUSED(tmpreg); \ } while(0U)
Clear the UART PE pending flag.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
None |
Definition at line 420 of file stm32f4xx_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 616 of file stm32f4xx_hal_uart.h.
Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), and HAL_UART_Init().
#define __HAL_UART_DISABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) |
((((__INTERRUPT__) >> 28U) == 1U)? ((__HANDLE__)->Instance->CR1 &= ~((__INTERRUPT__) & UART_IT_MASK)): \ (((__INTERRUPT__) >> 28U) == 2U)? ((__HANDLE__)->Instance->CR2 &= ~((__INTERRUPT__) & UART_IT_MASK)): \ ((__HANDLE__)->Instance->CR3 &= ~ ((__INTERRUPT__) & UART_IT_MASK)))
Disable the specified UART interrupt.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
__INTERRUPT__ | specifies the UART interrupt source to disable. This parameter can be one of the following values:
|
None |
Definition at line 496 of file stm32f4xx_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 610 of file stm32f4xx_hal_uart.h.
Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), and HAL_UART_Init().
#define __HAL_UART_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) |
((((__INTERRUPT__) >> 28U) == 1U)? ((__HANDLE__)->Instance->CR1 |= ((__INTERRUPT__) & UART_IT_MASK)): \ (((__INTERRUPT__) >> 28U) == 2U)? ((__HANDLE__)->Instance->CR2 |= ((__INTERRUPT__) & UART_IT_MASK)): \ ((__HANDLE__)->Instance->CR3 |= ((__INTERRUPT__) & UART_IT_MASK)))
Definition at line 477 of file stm32f4xx_hal_uart.h.
#define __HAL_UART_FLUSH_DRREGISTER | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->DR) |
Flushes the UART DR register.
__HANDLE__ | specifies the UART Handle. |
Definition at line 367 of file stm32f4xx_hal_uart.h.
#define __HAL_UART_GET_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__)) |
Checks whether the specified UART flag is set or not.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
__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 388 of file stm32f4xx_hal_uart.h.
Referenced by UART_WaitOnFlagUntilTimeout().
#define __HAL_UART_GET_IT_SOURCE | ( | __HANDLE__, | |
__IT__ | |||
) |
(((((__IT__) >> 28U) == 1U)? (__HANDLE__)->Instance->CR1:(((((uint32_t)(__IT__)) >> 28U) == 2U)? \ (__HANDLE__)->Instance->CR2 : (__HANDLE__)->Instance->CR3)) & (((uint32_t)(__IT__)) & UART_IT_MASK))
Checks whether the specified UART interrupt has occurred or not.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
__IT__ | specifies the UART interrupt source to check. This parameter can be one of the following values:
|
The | new state of __IT__ (TRUE or FALSE). |
Definition at line 515 of file stm32f4xx_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 This macro allows to disable CTS hardware flow control for a given UART instance, without need to call HAL_UART_Init() function.
As involving direct access to UART registers, usage of this macro should be fully endorsed by user.
__HANDLE__ | specifies the UART Handle. The Handle Instance can be USART1, USART2 or LPUART. |
None |
Definition at line 550 of file stm32f4xx_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 This macro allows to enable CTS hardware flow control for a given UART instance, without need to call HAL_UART_Init() function.
As involving direct access to UART registers, usage of this macro should be fully endorsed by user.
__HANDLE__ | specifies the UART Handle. The Handle Instance can be USART1, USART2 or LPUART. |
None |
Definition at line 531 of file stm32f4xx_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 This macro allows to disable RTS hardware flow control for a given UART instance, without need to call HAL_UART_Init() function.
As involving direct access to UART registers, usage of this macro should be fully endorsed by user.
__HANDLE__ | specifies the UART Handle. The Handle Instance can be USART1, USART2 or LPUART. |
None |
Definition at line 588 of file stm32f4xx_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 This macro allows to enable RTS hardware flow control for a given UART instance, without need to call HAL_UART_Init() function.
As involving direct access to UART registers, usage of this macro should be fully endorsed by user.
__HANDLE__ | specifies the UART Handle. The Handle Instance can be USART1, USART2 or LPUART. |
None |
Definition at line 569 of file stm32f4xx_hal_uart.h.
#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR3 &= (uint16_t)~((uint16_t)USART_CR3_ONEBIT)) |
macros to disables the UART's one bit sample method
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 604 of file stm32f4xx_hal_uart.h.
#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT) |
macros to enables the UART's one bit sample method
__HANDLE__ | specifies the UART Handle. |
None |
Definition at line 598 of file stm32f4xx_hal_uart.h.
#define __HAL_UART_RESET_HANDLE_STATE | ( | __HANDLE__ | ) |
do{ \ (__HANDLE__)->gState = HAL_UART_STATE_RESET; \ (__HANDLE__)->RxState = HAL_UART_STATE_RESET; \ } while(0U)
Reset UART handle gstate & RxState.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
None |
Definition at line 359 of file stm32f4xx_hal_uart.h.
#define UART_IT_MASK 0x0000FFFFU |
Enable the specified UART interrupt.
__HANDLE__ | specifies the UART Handle. This parameter can be UARTx where x: 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or UART peripheral. |
__INTERRUPT__ | specifies the UART interrupt source to enable. This parameter can be one of the following values:
|
None |
Definition at line 476 of file stm32f4xx_hal_uart.h.