Macros
UART Exported Macros
Peripheral Driver » HAL Driver » UART » Defines

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

  __HANDLE__ | Specifies the UART Handle.
  __INTERRUPT__ | 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 379 of file gr533x_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

  __HANDLE__ | Specifies the UART Handle.
  __INTERRUPT__ | 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 362 of file gr533x_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

  __HANDLE__ | UART handle.

Return values

  None |

Definition at line 346 of file gr533x_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

  __HANDLE__ | Specifies the UART Handle.
  __REQ__ | 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 395 of file gr533x_hal_uart.h.

HAL_UART_STATE_RESET
@ HAL_UART_STATE_RESET
Definition: gr533x_hal_uart.h:79