STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Macros
UART Exported Macros

Macros

#define __HAL_UART_RESET_HANDLE_STATE(__HANDLE__)
 Reset UART handle state. More...
 
#define __HAL_UART_FLUSH_DRREGISTER(__HANDLE__)
 Flush the UART Data registers. More...
 
#define __HAL_UART_CLEAR_IT(__HANDLE__, __FLAG__)   ((__HANDLE__)->Instance->ICR = (uint32_t)(__FLAG__))
 Clears the specified UART ISR flag, in setting the proper ICR register flag. More...
 
#define __HAL_UART_CLEAR_PEFLAG(__HANDLE__)    __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_PEF)
 Clear the UART PE pending flag. More...
 
#define __HAL_UART_CLEAR_FEFLAG(__HANDLE__)    __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_FEF)
 Clear the UART FE pending flag. More...
 
#define __HAL_UART_CLEAR_NEFLAG(__HANDLE__)   __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_NEF)
 Clear the UART NE pending flag. More...
 
#define __HAL_UART_CLEAR_OREFLAG(__HANDLE__)    __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_OREF)
 Clear the UART ORE pending flag. More...
 
#define __HAL_UART_CLEAR_IDLEFLAG(__HANDLE__)    __HAL_UART_CLEAR_IT((__HANDLE__),UART_CLEAR_IDLEF)
 Clear the UART IDLE pending flag. More...
 
#define __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__)   (((__HANDLE__)->Instance->ISR & (__FLAG__)) == (__FLAG__))
 Checks whether the specified UART flag is set or not. More...
 
#define __HAL_UART_ENABLE_IT(__HANDLE__, __INTERRUPT__)
 Enables the specified UART interrupt. More...
 
#define __HAL_UART_DISABLE_IT(__HANDLE__, __INTERRUPT__)
 Disables the specified UART interrupt. More...
 
#define __HAL_UART_GET_IT(__HANDLE__, __IT__)   ((__HANDLE__)->Instance->ISR & ((uint32_t)1 << ((__IT__)>> 0x08)))
 Checks whether the specified UART interrupt has occurred or not. More...
 
#define __HAL_UART_GET_IT_SOURCE(__HANDLE__, __IT__)
 Checks whether the specified UART interrupt source is enabled. More...
 
#define __HAL_UART_SEND_REQ(__HANDLE__, __REQ__)   ((__HANDLE__)->Instance->RQR |= (uint32_t)(__REQ__))
 Set a specific UART request flag. More...
 
#define __HAL_UART_ONE_BIT_SAMPLE_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR3|= USART_CR3_ONEBIT)
 Enables the UART one bit sample method. More...
 
#define __HAL_UART_ONE_BIT_SAMPLE_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR3 &= (uint32_t)~((uint32_t)USART_CR3_ONEBIT))
 Disables 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 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. More...
 
#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. As involving direct access to UART registers, usage of this macro should be fully endorsed by user. More...
 
#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. As involving direct access to UART registers, usage of this macro should be fully endorsed by user. More...
 
#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. As involving direct access to UART registers, usage of this macro should be fully endorsed by user. More...
 

Detailed Description

Macro Definition Documentation

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

Clear the UART FE pending flag.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
Return values
None

Definition at line 721 of file stm32f7xx_hal_uart.h.

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

Clear the UART IDLE pending flag.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
Return values
None

Definition at line 739 of file stm32f7xx_hal_uart.h.

#define __HAL_UART_CLEAR_IT (   __HANDLE__,
  __FLAG__ 
)    ((__HANDLE__)->Instance->ICR = (uint32_t)(__FLAG__))

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

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
<strong>FLAG</strong>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:
  • UART_CLEAR_PEF: Parity Error Clear Flag
  • UART_CLEAR_FEF: Framing Error Clear Flag
  • UART_CLEAR_NEF: Noise detected Clear Flag
  • UART_CLEAR_OREF: OverRun Error Clear Flag
  • UART_CLEAR_IDLEF: IDLE line detected Clear Flag
  • UART_CLEAR_TCF: Transmission Complete Clear Flag
  • UART_CLEAR_LBDF: LIN Break Detection Clear Flag
  • UART_CLEAR_CTSF: CTS Interrupt Clear Flag
  • UART_CLEAR_RTOF: Receiver Time Out Clear Flag
  • UART_CLEAR_EOBF: End Of Block Clear Flag
  • UART_CLEAR_CMF: Character Match Clear Flag
Return values
None

Definition at line 709 of file stm32f7xx_hal_uart.h.

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

Clear the UART NE pending flag.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
Return values
None

Definition at line 727 of file stm32f7xx_hal_uart.h.

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

Clear the UART ORE pending flag.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
Return values
None

Definition at line 733 of file stm32f7xx_hal_uart.h.

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

Clear the UART PE pending flag.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
Return values
None

Definition at line 715 of file stm32f7xx_hal_uart.h.

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

Disable UART.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
Return values
None

Definition at line 883 of file stm32f7xx_hal_uart.h.

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

Disables the specified UART interrupt.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
<strong>INTERRUPT</strong>specifies the UART interrupt source to disable. This parameter can be one of the following values:
  • UART_IT_CM: Character match interrupt
  • UART_IT_CTS: CTS change interrupt
  • UART_IT_LBD: LIN Break detection interrupt
  • UART_IT_TXE: Transmit Data Register empty interrupt
  • UART_IT_TC: Transmission complete interrupt
  • UART_IT_RXNE: Receive Data register not empty interrupt
  • UART_IT_IDLE: Idle line detection interrupt
  • UART_IT_PE: Parity Error interrupt
  • UART_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
Return values
None

Definition at line 806 of file stm32f7xx_hal_uart.h.

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

Enable UART.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
Return values
None

Definition at line 877 of file stm32f7xx_hal_uart.h.

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

Enables the specified UART interrupt.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
<strong>INTERRUPT</strong>specifies the UART interrupt source to enable. This parameter can be one of the following values:
  • UART_IT_WUF: Wakeup from stop mode interrupt
  • UART_IT_CM: Character match interrupt
  • UART_IT_CTS: CTS change interrupt
  • UART_IT_LBD: LIN Break detection interrupt
  • UART_IT_TXE: Transmit Data Register empty interrupt
  • UART_IT_TC: Transmission complete interrupt
  • UART_IT_RXNE: Receive Data register not empty interrupt
  • UART_IT_IDLE: Idle line detection interrupt
  • UART_IT_PE: Parity Error interrupt
  • UART_IT_ERR: Error interrupt(Frame error, noise error, overrun error)
Return values
None

Definition at line 786 of file stm32f7xx_hal_uart.h.

#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(0)
#define UART_RXDATA_FLUSH_REQUEST
#define UART_TXDATA_FLUSH_REQUEST

Flush the UART Data registers.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.

Definition at line 685 of file stm32f7xx_hal_uart.h.

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

Checks whether the specified UART flag is set or not.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
  • UART_FLAG_REACK: Receive enable acknowledge flag
  • UART_FLAG_TEACK: Transmit enable acknowledge flag
  • UART_FLAG_WUF: Wake up from stop mode flag
  • UART_FLAG_RWU: Receiver wake up flag (is the UART in mute mode)
  • UART_FLAG_SBKF: Send Break flag
  • UART_FLAG_CMF: Character match flag
  • UART_FLAG_BUSY: Busy flag
  • UART_FLAG_ABRF: Auto Baud rate detection flag
  • UART_FLAG_ABRE: Auto Baud rate detection error flag
  • UART_FLAG_EOBF: End of block flag
  • UART_FLAG_RTOF: Receiver timeout flag
  • UART_FLAG_CTS: CTS Change flag (not available for UART4 and UART5)
  • UART_FLAG_LBD: LIN Break detection flag
  • UART_FLAG_TXE: Transmit data register empty flag
  • UART_FLAG_TC: Transmission Complete flag
  • UART_FLAG_RXNE: Receive data register not empty flag
  • UART_FLAG_IDLE: Idle Line detection flag
  • UART_FLAG_ORE: OverRun Error flag
  • UART_FLAG_NE: Noise Error flag
  • UART_FLAG_FE: Framing Error flag
  • UART_FLAG_PE: Parity Error flag
Return values
Thenew state of FLAG (TRUE or FALSE).

Definition at line 768 of file stm32f7xx_hal_uart.h.

#define __HAL_UART_GET_IT (   __HANDLE__,
  __IT__ 
)    ((__HANDLE__)->Instance->ISR & ((uint32_t)1 << ((__IT__)>> 0x08)))

Checks whether the specified UART interrupt has occurred or not.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
<strong>IT</strong>specifies the UART interrupt to check. This parameter can be one of the following values:
  • UART_IT_CM: Character match interrupt
  • UART_IT_CTS: CTS change interrupt (not available for UART4 and UART5)
  • UART_IT_LBD: LIN Break detection interrupt
  • UART_IT_TXE: Transmit Data Register empty interrupt
  • UART_IT_TC: Transmission complete interrupt
  • UART_IT_RXNE: Receive Data register not empty interrupt
  • UART_IT_IDLE: Idle line detection interrupt
  • UART_IT_ORE: OverRun Error interrupt
  • UART_IT_NE: Noise Error interrupt
  • UART_IT_FE: Framing Error interrupt
  • UART_IT_PE: Parity Error interrupt
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 827 of file stm32f7xx_hal_uart.h.

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

Checks whether the specified UART interrupt source is enabled.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
<strong>IT</strong>specifies the UART interrupt source to check. This parameter can be one of the following values:
  • UART_IT_CTS: CTS change interrupt (not available for UART4 and UART5)
  • UART_IT_LBD: LIN Break detection interrupt
  • UART_IT_TXE: Transmit Data Register empty interrupt
  • UART_IT_TC: Transmission complete interrupt
  • UART_IT_RXNE: Receive Data register not empty interrupt
  • UART_IT_IDLE: Idle line detection interrupt
  • UART_IT_ORE: OverRun Error interrupt
  • UART_IT_NE: Noise Error interrupt
  • UART_IT_FE: Framing Error interrupt
  • UART_IT_PE: Parity Error interrupt
Return values
Thenew state of IT (TRUE or FALSE).

Definition at line 845 of file stm32f7xx_hal_uart.h.

#define __HAL_UART_HWCONTROL_CTS_DISABLE (   __HANDLE__)
Value:
do{ \
CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
(__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_CTSE); \
} while(0)
#define USART_CR3_CTSE
Definition: stm32f745xx.h:7473

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.

Note
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
<strong>HANDLE</strong>specifies the UART Handle. The Handle Instance can be USART1, USART2 or LPUART.
Return values
None

Definition at line 917 of file stm32f7xx_hal_uart.h.

#define __HAL_UART_HWCONTROL_CTS_ENABLE (   __HANDLE__)
Value:
do{ \
SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_CTSE); \
(__HANDLE__)->Init.HwFlowCtl |= USART_CR3_CTSE; \
} while(0)
#define USART_CR3_CTSE
Definition: stm32f745xx.h:7473

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.

Note
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
<strong>HANDLE</strong>specifies the UART Handle. The Handle Instance can be USART1, USART2 or LPUART.
Return values
None

Definition at line 898 of file stm32f7xx_hal_uart.h.

#define __HAL_UART_HWCONTROL_RTS_DISABLE (   __HANDLE__)
Value:
do{ \
CLEAR_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE);\
(__HANDLE__)->Init.HwFlowCtl &= ~(USART_CR3_RTSE); \
} while(0)
#define USART_CR3_RTSE
Definition: stm32f745xx.h:7472

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.

Note
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
<strong>HANDLE</strong>specifies the UART Handle. The Handle Instance can be USART1, USART2 or LPUART.
Return values
None

Definition at line 955 of file stm32f7xx_hal_uart.h.

#define __HAL_UART_HWCONTROL_RTS_ENABLE (   __HANDLE__)
Value:
do{ \
SET_BIT((__HANDLE__)->Instance->CR3, USART_CR3_RTSE); \
(__HANDLE__)->Init.HwFlowCtl |= USART_CR3_RTSE; \
} while(0)
#define USART_CR3_RTSE
Definition: stm32f745xx.h:7472

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.

Note
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
<strong>HANDLE</strong>specifies the UART Handle. The Handle Instance can be USART1, USART2 or LPUART.
Return values
None

Definition at line 936 of file stm32f7xx_hal_uart.h.

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

Disables the UART one bit sample method.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
Return values
None

Definition at line 871 of file stm32f7xx_hal_uart.h.

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

Enables the UART one bit sample method.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
Return values
None

Definition at line 865 of file stm32f7xx_hal_uart.h.

#define __HAL_UART_RESET_HANDLE_STATE (   __HANDLE__)
Value:
do{ \
(__HANDLE__)->gState = HAL_UART_STATE_RESET; \
(__HANDLE__)->RxState = HAL_UART_STATE_RESET; \
} while(0)

Reset UART handle state.

Parameters
<strong>HANDLE</strong>UART handle.
Return values
None

Definition at line 677 of file stm32f7xx_hal_uart.h.

#define __HAL_UART_SEND_REQ (   __HANDLE__,
  __REQ__ 
)    ((__HANDLE__)->Instance->RQR |= (uint32_t)(__REQ__))

Set a specific UART request flag.

Parameters
<strong>HANDLE</strong>specifies the UART Handle.
<strong>REQ</strong>specifies the request flag to set This parameter can be one of the following values:
  • UART_AUTOBAUD_REQUEST: Auto-Baud Rate Request
  • UART_SENDBREAK_REQUEST: Send Break Request
  • UART_MUTE_MODE_REQUEST: Mute Mode Request
  • UART_RXDATA_FLUSH_REQUEST: Receive Data flush Request
  • UART_TXDATA_FLUSH_REQUEST: Transmit data flush Request
Return values
None

Definition at line 859 of file stm32f7xx_hal_uart.h.