STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
UART Exported Macros
Collaboration diagram for UART Exported Macros:

Macros

#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__)
 Clear the specified UART pending flag.
#define __HAL_UART_CLEAR_PEFLAG(__HANDLE__)
 Clear the UART PE pending flag.
#define __HAL_UART_CLEAR_FEFLAG(__HANDLE__)
 Clear the UART FE pending flag.
#define __HAL_UART_CLEAR_NEFLAG(__HANDLE__)
 Clear the UART NE pending flag.
#define __HAL_UART_CLEAR_OREFLAG(__HANDLE__)
 Clear the UART ORE pending flag.
#define __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__)
 Clear the UART IDLE pending flag.
#define __HAL_UART_CLEAR_TXFECF(__HANDLE__)
 Clear the UART TX FIFO empty clear flag.
#define __HAL_UART_GET_FLAG(__HANDLE__, __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__)
 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__)
 Clear the specified UART ISR flag, in setting the proper ICR register flag.
#define __HAL_UART_SEND_REQ(__HANDLE__, __REQ__)
 Set a specific UART request flag.
#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__)
 Enable the UART one bit sample method.
#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__)
 Disable the UART one bit sample method.
#define __HAL_UART_ENABLE(__HANDLE__)
 Enable UART.
#define __HAL_UART_DISABLE(__HANDLE__)
 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.

Detailed Description

Macro Definition Documentation

◆ __HAL_UART_CLEAR_FEFLAG

#define __HAL_UART_CLEAR_FEFLAG ( __HANDLE__)
Value:
#define __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__)
Clear the specified UART pending flag.
#define UART_CLEAR_FEF
Framing Error Clear Flag.

Clear the UART FE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 910 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_CLEAR_FLAG

#define __HAL_UART_CLEAR_FLAG ( __HANDLE__,
__FLAG__ )
Value:
((__HANDLE__)->Instance->ICR = (__FLAG__))

Clear the specified UART pending flag.

Parameters
__HANDLE__specifies the UART Handle.
__FLAG__specifies the flag to check. This parameter can be any combination of the following values:
Return values
None

Definition at line 898 of file stm32h7xx_hal_uart.h.

Referenced by gnss_probe().

◆ __HAL_UART_CLEAR_IDLEFLAG

#define __HAL_UART_CLEAR_IDLEFLAG ( __HANDLE__)
Value:
#define UART_CLEAR_IDLEF
IDLE line detected Clear Flag.

Clear the UART IDLE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 928 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_CLEAR_IT

#define __HAL_UART_CLEAR_IT ( __HANDLE__,
__IT_CLEAR__ )
Value:
((__HANDLE__)->Instance->ICR = (uint32_t)(__IT_CLEAR__))

Clear the specified UART ISR flag, in setting the proper ICR register flag.

Parameters
__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:
Return values
None

Definition at line 1112 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_CLEAR_NEFLAG

#define __HAL_UART_CLEAR_NEFLAG ( __HANDLE__)
Value:
#define UART_CLEAR_NEF
Noise Error detected Clear Flag.

Clear the UART NE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 916 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_CLEAR_OREFLAG

#define __HAL_UART_CLEAR_OREFLAG ( __HANDLE__)
Value:
#define UART_CLEAR_OREF
Overrun Error Clear Flag.

Clear the UART ORE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 922 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_CLEAR_PEFLAG

#define __HAL_UART_CLEAR_PEFLAG ( __HANDLE__)
Value:
#define UART_CLEAR_PEF
Parity Error Clear Flag.

Clear the UART PE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 904 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_CLEAR_TXFECF

#define __HAL_UART_CLEAR_TXFECF ( __HANDLE__)
Value:
#define UART_CLEAR_TXFECF
TXFIFO empty clear flag.

Clear the UART TX FIFO empty clear flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 934 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_DISABLE

#define __HAL_UART_DISABLE ( __HANDLE__)
Value:
((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
#define USART_CR1_UE
USART Enable.

Disable UART.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 1149 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_DISABLE_IT

#define __HAL_UART_DISABLE_IT ( __HANDLE__,
__INTERRUPT__ )
Value:
(\
((((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))))
#define UART_IT_MASK
UART interruptions flags mask.

Disable the specified UART interrupt.

Parameters
__HANDLE__specifies the UART Handle.
__INTERRUPT__specifies the UART interrupt source to disable. This parameter can be one of the following values:
Return values
None

Definition at line 1026 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_ENABLE

#define __HAL_UART_ENABLE ( __HANDLE__)
Value:
((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)

Enable UART.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 1143 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_ENABLE_IT

#define __HAL_UART_ENABLE_IT ( __HANDLE__,
__INTERRUPT__ )
Value:
(\
((((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.

Parameters
__HANDLE__specifies the UART Handle.
__INTERRUPT__specifies the UART interrupt source to enable. This parameter can be one of the following values:
Return values
None

Definition at line 993 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_FLUSH_DRREGISTER

#define __HAL_UART_FLUSH_DRREGISTER ( __HANDLE__)
Value:
do{ \
SET_BIT((__HANDLE__)->Instance->RQR, UART_RXDATA_FLUSH_REQUEST); \
SET_BIT((__HANDLE__)->Instance->RQR, UART_TXDATA_FLUSH_REQUEST); \
} while(0U)
#define UART_RXDATA_FLUSH_REQUEST
Receive Data flush Request.
#define UART_TXDATA_FLUSH_REQUEST
Transmit data flush Request.

Flush the UART Data registers.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 874 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_GET_FLAG

#define __HAL_UART_GET_FLAG ( __HANDLE__,
__FLAG__ )
Value:
(((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))

Check whether the specified UART flag is set or not.

Parameters
__HANDLE__specifies the UART Handle.
__FLAG__specifies the flag to check. This parameter can be one of the following values:
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 968 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_GET_IT

#define __HAL_UART_GET_IT ( __HANDLE__,
__INTERRUPT__ )
Value:
((((__HANDLE__)->Instance->ISR\
& (1U << ((__INTERRUPT__)>> 8U))) != RESET) ? SET : RESET)
@ RESET
Definition stm32h7xx.h:182
@ SET
Definition stm32h7xx.h:183

Check whether the specified UART interrupt has occurred or not.

Parameters
__HANDLE__specifies the UART Handle.
__INTERRUPT__specifies the UART interrupt to check. This parameter can be one of the following values:
Return values
Thenew state of INTERRUPT (SET or RESET).

Definition at line 1059 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_GET_IT_SOURCE

#define __HAL_UART_GET_IT_SOURCE ( __HANDLE__,
__INTERRUPT__ )
Value:
((((((((uint8_t)(__INTERRUPT__)) >> 5U) == 1U) ?\
(__HANDLE__)->Instance->CR1 : \
(((((uint8_t)(__INTERRUPT__)) >> 5U) == 2U) ?\
(__HANDLE__)->Instance->CR2 : \
(__HANDLE__)->Instance->CR3)) & (1U <<\
(((uint16_t)(__INTERRUPT__)) &\

Check whether the specified UART interrupt source is enabled or not.

Parameters
__HANDLE__specifies the UART Handle.
__INTERRUPT__specifies the UART interrupt source to check. This parameter can be one of the following values:
Return values
Thenew state of INTERRUPT (SET or RESET).

Definition at line 1085 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_HWCONTROL_CTS_DISABLE

#define __HAL_UART_HWCONTROL_CTS_DISABLE ( __HANDLE__)
Value:
do{ \
ATOMIC_CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
(__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_CTSE); \
} while(0U)
#define USART_CR3_CTSE
CTS Enable.

Disable CTS flow control.

Note
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.
As macro is expected to be used for modifying CTS Hw flow control feature activation, without need for USART instance Deinit/Init, following conditions for macro call should be fulfilled :
  • UART instance should have already been initialised (through call of HAL_UART_Init() )
  • macro could only be called when corresponding UART instance is disabled (i.e. HAL_UART_DISABLE(__HANDLE)) and should be followed by an Enable macro (i.e. HAL_UART_ENABLE(__HANDLE)).
Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 1183 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_HWCONTROL_CTS_ENABLE

#define __HAL_UART_HWCONTROL_CTS_ENABLE ( __HANDLE__)
Value:
do{ \
ATOMIC_SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
(__HANDLE__)->Init.HwFlowCtl |= USART_CR3_CTSE; \
} while(0U)

Enable CTS flow control.

Note
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.
As macro is expected to be used for modifying CTS Hw flow control feature activation, without need for USART instance Deinit/Init, following conditions for macro call should be fulfilled :
  • UART instance should have already been initialised (through call of HAL_UART_Init() )
  • macro could only be called when corresponding UART instance is disabled (i.e. HAL_UART_DISABLE(__HANDLE)) and should be followed by an Enable macro (i.e. HAL_UART_ENABLE(__HANDLE)).
Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 1164 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_HWCONTROL_RTS_DISABLE

#define __HAL_UART_HWCONTROL_RTS_DISABLE ( __HANDLE__)
Value:
do{ \
ATOMIC_CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE);\
(__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_RTSE); \
} while(0U)
#define USART_CR3_RTSE
RTS Enable.

Disable RTS flow control.

Note
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.
As macro is expected to be used for modifying RTS Hw flow control feature activation, without need for USART instance Deinit/Init, following conditions for macro call should be fulfilled :
  • UART instance should have already been initialised (through call of HAL_UART_Init() )
  • macro could only be called when corresponding UART instance is disabled (i.e. HAL_UART_DISABLE(__HANDLE)) and should be followed by an Enable macro (i.e. HAL_UART_ENABLE(__HANDLE)).
Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 1221 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_HWCONTROL_RTS_ENABLE

#define __HAL_UART_HWCONTROL_RTS_ENABLE ( __HANDLE__)
Value:
do{ \
ATOMIC_SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE); \
(__HANDLE__)->Init.HwFlowCtl |= USART_CR3_RTSE; \
} while(0U)

Enable RTS flow control.

Note
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.
As macro is expected to be used for modifying RTS Hw flow control feature activation, without need for USART instance Deinit/Init, following conditions for macro call should be fulfilled :
  • UART instance should have already been initialised (through call of HAL_UART_Init() )
  • macro could only be called when corresponding UART instance is disabled (i.e. HAL_UART_DISABLE(__HANDLE)) and should be followed by an Enable macro (i.e. HAL_UART_ENABLE(__HANDLE)).
Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 1202 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_ONE_BIT_SAMPLE_DISABLE

#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE ( __HANDLE__)
Value:
((__HANDLE__)->Instance->CR3 &= ~USART_CR3_ONEBIT)
#define USART_CR3_ONEBIT
One sample bit method enable.

Disable the UART one bit sample method.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 1137 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_ONE_BIT_SAMPLE_ENABLE

#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE ( __HANDLE__)
Value:
((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)

Enable the UART one bit sample method.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

Definition at line 1131 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_RESET_HANDLE_STATE

#define __HAL_UART_RESET_HANDLE_STATE ( __HANDLE__)
Value:
do{ \
(__HANDLE__)->gState = HAL_UART_STATE_RESET; \
(__HANDLE__)->RxState = HAL_UART_STATE_RESET; \
} while(0U)
#define HAL_UART_STATE_RESET
Peripheral is not initialized Value is allowed for gState and RxState.

Reset UART handle states.

Parameters
__HANDLE__UART handle.
Return values
None

Definition at line 864 of file stm32h7xx_hal_uart.h.

◆ __HAL_UART_SEND_REQ

#define __HAL_UART_SEND_REQ ( __HANDLE__,
__REQ__ )
Value:
((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__))

Set a specific UART request flag.

Parameters
__HANDLE__specifies the UART Handle.
__REQ__specifies the request flag to set This parameter can be one of the following values:
Return values
None

Definition at line 1125 of file stm32h7xx_hal_uart.h.