RTEMS 6.1-rc1
Macros

Macros

#define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__)
 Reset UART handle states. More...
 
#define __HAL_UART_FLUSH_DRREGISTER(__HANDLE__)
 Flush the UART Data registers. More...
 
#define __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__)   ((__HANDLE__)->Instance->ICR = (__FLAG__))
 Clear the specified UART pending flag. More...
 
#define __HAL_UART_CLEAR_PEFLAG(__HANDLE__)   __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_PEF)
 Clear the UART PE pending flag. More...
 
#define __HAL_UART_CLEAR_FEFLAG(__HANDLE__)   __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_FEF)
 Clear the UART FE pending flag. More...
 
#define __HAL_UART_CLEAR_NEFLAG(__HANDLE__)   __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_NEF)
 Clear the UART NE pending flag. More...
 
#define __HAL_UART_CLEAR_OREFLAG(__HANDLE__)   __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_OREF)
 Clear the UART ORE pending flag. More...
 
#define __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__)   __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_IDLEF)
 Clear the UART IDLE pending flag. More...
 
#define __HAL_UART_CLEAR_TXFECF(__HANDLE__)   __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_TXFECF)
 Clear the UART TX FIFO empty clear flag. More...
 
#define __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__)   (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
 Check whether the specified UART flag is set or not. More...
 
#define __HAL_UART_ENABLE_IT(__HANDLE__, __INTERRUPT__)
 Enable the specified UART interrupt. More...
 
#define __HAL_UART_DISABLE_IT(__HANDLE__, __INTERRUPT__)
 Disable the specified UART interrupt. More...
 
#define __HAL_UART_GET_IT(__HANDLE__, __INTERRUPT__)
 Check whether the specified UART interrupt has occurred or not. More...
 
#define __HAL_UART_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Check whether the specified UART interrupt source is enabled or not. More...
 
#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. More...
 
#define __HAL_UART_SEND_REQ(__HANDLE__, __REQ__)   ((__HANDLE__)->Instance->RQR |= (uint16_t)(__REQ__))
 Set a specific UART request flag. More...
 
#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
 Enable the UART one bit sample method. More...
 
#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR3 &= ~USART_CR3_ONEBIT)
 Disable the UART one bit sample method. More...
 
#define __HAL_UART_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR1 |= USART_CR1_UE)
 Enable UART. More...
 
#define __HAL_UART_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)
 Disable UART. More...
 
#define __HAL_UART_HWCONTROL_CTS_ENABLE(__HANDLE__)
 Enable CTS flow control. More...
 
#define __HAL_UART_HWCONTROL_CTS_DISABLE(__HANDLE__)
 Disable CTS flow control. More...
 
#define __HAL_UART_HWCONTROL_RTS_ENABLE(__HANDLE__)
 Enable RTS flow control. More...
 
#define __HAL_UART_HWCONTROL_RTS_DISABLE(__HANDLE__)
 Disable RTS flow control. More...
 

Detailed Description

Macro Definition Documentation

◆ __HAL_UART_CLEAR_FEFLAG

#define __HAL_UART_CLEAR_FEFLAG (   __HANDLE__)    __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_FEF)

Clear the UART FE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __HAL_UART_CLEAR_FLAG

#define __HAL_UART_CLEAR_FLAG (   __HANDLE__,
  __FLAG__ 
)    ((__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

◆ __HAL_UART_CLEAR_IDLEFLAG

#define __HAL_UART_CLEAR_IDLEFLAG (   __HANDLE__)    __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_IDLEF)

Clear the UART IDLE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __HAL_UART_CLEAR_IT

#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.

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

◆ __HAL_UART_CLEAR_NEFLAG

#define __HAL_UART_CLEAR_NEFLAG (   __HANDLE__)    __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_NEF)

Clear the UART NE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __HAL_UART_CLEAR_OREFLAG

#define __HAL_UART_CLEAR_OREFLAG (   __HANDLE__)    __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_OREF)

Clear the UART ORE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __HAL_UART_CLEAR_PEFLAG

#define __HAL_UART_CLEAR_PEFLAG (   __HANDLE__)    __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_PEF)

Clear the UART PE pending flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __HAL_UART_CLEAR_TXFECF

#define __HAL_UART_CLEAR_TXFECF (   __HANDLE__)    __HAL_UART_CLEAR_FLAG((__HANDLE__), UART_CLEAR_TXFECF)

Clear the UART TX FIFO empty clear flag.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __HAL_UART_DISABLE

#define __HAL_UART_DISABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR1 &= ~USART_CR1_UE)

Disable UART.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __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
Definition: stm32h7xx_hal_uart.h:750

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

◆ __HAL_UART_ENABLE

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

Enable UART.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __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

◆ __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
Definition: stm32h7xx_hal_uart.h:570
#define UART_TXDATA_FLUSH_REQUEST
Definition: stm32h7xx_hal_uart.h:571

Flush the UART Data registers.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __HAL_UART_GET_FLAG

#define __HAL_UART_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    (((__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).

◆ __HAL_UART_GET_IT

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

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).

◆ __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__)) &\
UART_IT_MASK))) != RESET) ? SET : RESET)

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).

◆ __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
Definition: stm32h723xx.h:21082

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

◆ __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

◆ __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
Definition: stm32h723xx.h:21079

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

◆ __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

◆ __HAL_UART_ONE_BIT_SAMPLE_DISABLE

#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR3 &= ~USART_CR3_ONEBIT)

Disable the UART one bit sample method.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __HAL_UART_ONE_BIT_SAMPLE_ENABLE

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

Enable the UART one bit sample method.

Parameters
__HANDLE__specifies the UART Handle.
Return values
None

◆ __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
Definition: stm32h7xx_hal_uart.h:341

Reset UART handle states.

Parameters
__HANDLE__UART handle.
Return values
None

◆ __HAL_UART_SEND_REQ

#define __HAL_UART_SEND_REQ (   __HANDLE__,
  __REQ__ 
)    ((__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