Macros
UART Private Macros
Peripheral Driver » HAL Driver » UART » Defines

## Macros
#define | IS_UART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 921600U)
| Check if UART Baudrate is valid. More...
#define | IS_UART_STOPBITS(__STOPBITS__)
| Check if UART frame number of stop bits is valid. More...
#define | IS_UART_DATABITS(__DATABITS__)
| Check if UART frame number of data bits is valid. More...
#define | IS_UART_PARITY(__PARITY__)
| Check if UART frame parity is valid. More...
#define | IS_UART_HARDWARE_FLOW_CONTROL(__CONTROL__)
| Check if UART hardware flow control is valid. More...

## Detailed Description

## Macro Definition Documentation

## ◆ IS_UART_BAUDRATE

#define IS_UART_BAUDRATE | ( |  | __BAUDRATE__ | ) | ((__BAUDRATE__) < 921600U)

Check if UART Baudrate is valid.

Parameters

  <strong>BAUDRATE</strong> | UART Baudrate.

Return values

  SET | (BAUDRATE is valid) or RESET (BAUDRATE is invalid)

Definition at line 399 of file gr55xx_hal_uart.h.

## ◆ IS_UART_DATABITS

#define IS_UART_DATABITS | ( |  | __DATABITS__ | ) |

Value:
(((__DATABITS__) == UART_DATABITS_5) || \
((__DATABITS__) == UART_DATABITS_6) || \
((__DATABITS__) == UART_DATABITS_7) || \
((__DATABITS__) == UART_DATABITS_8))

Check if UART frame number of data bits is valid.

Parameters

  <strong>DATABITS</strong> | UART frame number of data bits.

Return values

  SET | (DATABITS is valid) or RESET (DATABITS is invalid)

Definition at line 415 of file gr55xx_hal_uart.h.

## ◆ IS_UART_HARDWARE_FLOW_CONTROL

#define IS_UART_HARDWARE_FLOW_CONTROL | ( |  | __CONTROL__ | ) |

Value:
(((__CONTROL__) == UART_HWCONTROL_NONE) || \
((__CONTROL__) == UART_HWCONTROL_RTS_CTS)

Check if UART hardware flow control is valid.

Parameters

  <strong>CONTROL</strong> | UART hardware flow control.

Return values

  SET | (CONTROL is valid) or RESET (CONTROL is invalid)

Definition at line 436 of file gr55xx_hal_uart.h.

## ◆ IS_UART_PARITY

#define IS_UART_PARITY | ( |  | __PARITY__ | ) |

Value:
(((__PARITY__) == UART_PARITY_NONE) || \
((__PARITY__) == UART_PARITY_EVEN) || \
((__PARITY__) == UART_PARITY_ODD) || \
((__PARITY__) == UART_PARITY_SP0) || \
((__PARITY__) == UART_PARITY_SP1))

Check if UART frame parity is valid.

Parameters

  <strong>PARITY</strong> | UART frame parity.

Return values

  SET | (PARITY is valid) or RESET (PARITY is invalid)

Definition at line 425 of file gr55xx_hal_uart.h.

## ◆ IS_UART_STOPBITS

#define IS_UART_STOPBITS | ( |  | __STOPBITS__ | ) |

Value:
(((__STOPBITS__) == UART_STOPBITS_1) || \
((__STOPBITS__) == UART_STOPBITS_1_5) || \
((__STOPBITS__) == UART_STOPBITS_2))

Check if UART frame number of stop bits is valid.

Parameters

  <strong>STOPBITS</strong> | UART frame number of stop bits.

Return values

  SET | (STOPBITS is valid) or RESET (STOPBITS is invalid)

Definition at line 406 of file gr55xx_hal_uart.h.

UART_DATABITS_8
#define UART_DATABITS_8
UART frame with 8 data bits.
Definition: gr55xx_hal_uart.h:250
UART_HWCONTROL_NONE
#define UART_HWCONTROL_NONE
No hardware control
Definition: gr55xx_hal_uart.h:274
UART_DATABITS_6
#define UART_DATABITS_6
UART frame with 6 data bits.
Definition: gr55xx_hal_uart.h:248
UART_STOPBITS_1_5
#define UART_STOPBITS_1_5
UART frame with 1.5 stop bits.
Definition: gr55xx_hal_uart.h:257
UART_PARITY_NONE
#define UART_PARITY_NONE
No parity
Definition: gr55xx_hal_uart.h:264
UART_PARITY_SP1
#define UART_PARITY_SP1
Stick Parity 1
Definition: gr55xx_hal_uart.h:268
UART_DATABITS_5
#define UART_DATABITS_5
UART frame with 5 data bits.
Definition: gr55xx_hal_uart.h:247
UART_PARITY_SP0
#define UART_PARITY_SP0
Stick Parity 0
Definition: gr55xx_hal_uart.h:267
UART_HWCONTROL_RTS_CTS
#define UART_HWCONTROL_RTS_CTS
Auto RTS and CTS hardware flow control
Definition: gr55xx_hal_uart.h:275
UART_DATABITS_7
#define UART_DATABITS_7
UART frame with 7 data bits.
Definition: gr55xx_hal_uart.h:249
UART_PARITY_EVEN
#define UART_PARITY_EVEN
Even parity
Definition: gr55xx_hal_uart.h:266
UART_STOPBITS_1
#define UART_STOPBITS_1
UART frame with 1 stop bit
Definition: gr55xx_hal_uart.h:256
UART_STOPBITS_2
#define UART_STOPBITS_2
UART frame with 2 stop bits
Definition: gr55xx_hal_uart.h:258
UART_PARITY_ODD
#define UART_PARITY_ODD
Odd parity.
Definition: gr55xx_hal_uart.h:265