Macros
UART Exported Macros
Peripheral Driver » HAL Driver » UART » Defines
Collaboration diagram for UART Exported Macros:

## Macros
#define | __HAL_UART_RESET_HANDLE_STATE(__HANDLE__)
| Reset UART handle states. 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_SEND_REQ(__HANDLE__, __REQ__) ((__HANDLE__)->p_instance->SRR = (__REQ__))
| Flush the UART FIFO and treat FIFO as empty. More...

## Detailed Description

## Macro Definition Documentation

## ◆ __HAL_UART_DISABLE_IT

#define __HAL_UART_DISABLE_IT | ( |  | __HANDLE__,
|  |  | __INTERRUPT__
| ) |  |

Value:
do { \
GLOBAL_EXCEPTION_DISABLE(); \
ll_uart_disable_it((__HANDLE__)->p_instance, (__INTERRUPT__)); \
GLOBAL_EXCEPTION_ENABLE(); \
} while(0)

Disable 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_RDA UART_IT_THRE UART_IT_RLS UART_IT_MS

Return values

  None |

Definition at line 378 of file gr55xx_hal_uart.h.

## ◆ __HAL_UART_ENABLE_IT

#define __HAL_UART_ENABLE_IT | ( |  | __HANDLE__,
|  |  | __INTERRUPT__
| ) |  |

Value:
do { \
GLOBAL_EXCEPTION_DISABLE(); \
ll_uart_enable_it((__HANDLE__)->p_instance, (__INTERRUPT__)); \
GLOBAL_EXCEPTION_ENABLE(); \
} while(0U)

Enable 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_RDA UART_IT_THRE UART_IT_RLS UART_IT_MS

Return values

  None |

Definition at line 361 of file gr55xx_hal_uart.h.

## ◆ __HAL_UART_RESET_HANDLE_STATE

#define __HAL_UART_RESET_HANDLE_STATE | ( |  | __HANDLE__ | ) |

Value:
do{ \
(__HANDLE__)->g_state = HAL_UART_STATE_RESET; \
(__HANDLE__)->rx_state = HAL_UART_STATE_RESET; \
} while(0U)

Reset UART handle states.

Parameters

  <strong>HANDLE</strong> | UART handle.

Return values

  None |

Definition at line 345 of file gr55xx_hal_uart.h.

## ◆ __HAL_UART_SEND_REQ

#define __HAL_UART_SEND_REQ | ( |  | __HANDLE__,
|  |  | __REQ__
| ) |  | ((__HANDLE__)->p_instance->SRR = (__REQ__))

Flush the UART FIFO and treat FIFO as empty.

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_RXDATA_FLUSH_REQUEST RX FIFO flush Request UART_TXDATA_FLUSH_REQUEST TX FIFO flush Request UART_TXRXDATA_FLUSH_REQUEST TX FIFO and RX FIFO flush

Return values

  None |

Definition at line 394 of file gr55xx_hal_uart.h.

HAL_UART_STATE_RESET
@ HAL_UART_STATE_RESET
Peripheral is not initialized.
Definition: gr55xx_hal_uart.h:78