RTEMS 6.1-rc1
Macros

Macros

#define UART_GET_DIV_FACTOR(__CLOCKPRESCALER__)
 Get UART clok division factor from clock prescaler value. More...
 
#define UART_DIV_LPUART(__PCLK__, __BAUD__, __CLOCKPRESCALER__)
 BRR division operation to set BRR register with LPUART. More...
 
#define UART_DIV_SAMPLING8(__PCLK__, __BAUD__, __CLOCKPRESCALER__)    (((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)])*2U) + ((__BAUD__)/2U)) / (__BAUD__))
 BRR division operation to set BRR register in 8-bit oversampling mode. More...
 
#define UART_DIV_SAMPLING16(__PCLK__, __BAUD__, __CLOCKPRESCALER__)    ((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)]) + ((__BAUD__)/2U)) / (__BAUD__))
 BRR division operation to set BRR register in 16-bit oversampling mode. More...
 
#define UART_INSTANCE_LOWPOWER(__HANDLE__)   (IS_LPUART_INSTANCE((__HANDLE__)->Instance))
 Check whether or not UART instance is Low Power UART. More...
 
#define IS_UART_BAUDRATE(__BAUDRATE__)   ((__BAUDRATE__) < 12500001U)
 Check UART Baud rate. More...
 
#define IS_UART_ASSERTIONTIME(__TIME__)   ((__TIME__) <= 0x1FU)
 Check UART assertion time. More...
 
#define IS_UART_DEASSERTIONTIME(__TIME__)   ((__TIME__) <= 0x1FU)
 Check UART deassertion time. More...
 
#define IS_UART_STOPBITS(__STOPBITS__)
 Ensure that UART frame number of stop bits is valid. More...
 
#define IS_LPUART_STOPBITS(__STOPBITS__)
 Ensure that LPUART frame number of stop bits is valid. More...
 
#define IS_UART_PARITY(__PARITY__)
 Ensure that UART frame parity is valid. More...
 
#define IS_UART_HARDWARE_FLOW_CONTROL(__CONTROL__)
 Ensure that UART hardware flow control is valid. More...
 
#define IS_UART_MODE(__MODE__)   ((((__MODE__) & (~((uint32_t)(UART_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U))
 Ensure that UART communication mode is valid. More...
 
#define IS_UART_STATE(__STATE__)
 Ensure that UART state is valid. More...
 
#define IS_UART_OVERSAMPLING(__SAMPLING__)
 Ensure that UART oversampling is valid. More...
 
#define IS_UART_ONE_BIT_SAMPLE(__ONEBIT__)
 Ensure that UART frame sampling is valid. More...
 
#define IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(__MODE__)
 Ensure that UART auto Baud rate detection mode is valid. More...
 
#define IS_UART_RECEIVER_TIMEOUT(__TIMEOUT__)
 Ensure that UART receiver timeout setting is valid. More...
 
#define IS_UART_RECEIVER_TIMEOUT_VALUE(__TIMEOUTVALUE__)   ((__TIMEOUTVALUE__) <= 0xFFFFFFU)
 Check the receiver timeout value. More...
 
#define IS_UART_LIN(__LIN__)
 Ensure that UART LIN state is valid. More...
 
#define IS_UART_LIN_BREAK_DETECT_LENGTH(__LENGTH__)
 Ensure that UART LIN break detection length is valid. More...
 
#define IS_UART_DMA_TX(__DMATX__)
 Ensure that UART DMA TX state is valid. More...
 
#define IS_UART_DMA_RX(__DMARX__)
 Ensure that UART DMA RX state is valid. More...
 
#define IS_UART_HALF_DUPLEX(__HDSEL__)
 Ensure that UART half-duplex state is valid. More...
 
#define IS_UART_WAKEUPMETHOD(__WAKEUP__)
 Ensure that UART wake-up method is valid. More...
 
#define IS_UART_REQUEST_PARAMETER(__PARAM__)
 Ensure that UART request parameter is valid. More...
 
#define IS_UART_ADVFEATURE_INIT(__INIT__)
 Ensure that UART advanced features initialization is valid. More...
 
#define IS_UART_ADVFEATURE_TXINV(__TXINV__)
 Ensure that UART frame TX inversion setting is valid. More...
 
#define IS_UART_ADVFEATURE_RXINV(__RXINV__)
 Ensure that UART frame RX inversion setting is valid. More...
 
#define IS_UART_ADVFEATURE_DATAINV(__DATAINV__)
 Ensure that UART frame data inversion setting is valid. More...
 
#define IS_UART_ADVFEATURE_SWAP(__SWAP__)
 Ensure that UART frame RX/TX pins swap setting is valid. More...
 
#define IS_UART_OVERRUN(__OVERRUN__)
 Ensure that UART frame overrun setting is valid. More...
 
#define IS_UART_ADVFEATURE_AUTOBAUDRATE(__AUTOBAUDRATE__)
 Ensure that UART auto Baud rate state is valid. More...
 
#define IS_UART_ADVFEATURE_DMAONRXERROR(__DMA__)
 Ensure that UART DMA enabling or disabling on error setting is valid. More...
 
#define IS_UART_ADVFEATURE_MSBFIRST(__MSBFIRST__)
 Ensure that UART frame MSB first setting is valid. More...
 
#define IS_UART_ADVFEATURE_STOPMODE(__STOPMODE__)
 Ensure that UART stop mode state is valid. More...
 
#define IS_UART_MUTE_MODE(__MUTE__)
 Ensure that UART mute mode state is valid. More...
 
#define IS_UART_WAKEUP_SELECTION(__WAKE__)
 Ensure that UART wake-up selection is valid. More...
 
#define IS_UART_DE_POLARITY(__POLARITY__)
 Ensure that UART driver enable polarity is valid. More...
 
#define IS_UART_PRESCALER(__CLOCKPRESCALER__)
 Ensure that UART Prescaler is valid. More...
 

Detailed Description

Macro Definition Documentation

◆ IS_LPUART_STOPBITS

#define IS_LPUART_STOPBITS (   __STOPBITS__)
Value:
(((__STOPBITS__) == UART_STOPBITS_1) || \
((__STOPBITS__) == UART_STOPBITS_2))
#define UART_STOPBITS_1
Definition: stm32h7xx_hal_uart.h:386
#define UART_STOPBITS_2
Definition: stm32h7xx_hal_uart.h:388

Ensure that LPUART frame number of stop bits is valid.

Parameters
__STOPBITS__LPUART frame number of stop bits.
Return values
SET(STOPBITS is valid) or RESET (STOPBITS is invalid)

◆ IS_UART_ADVFEATURE_AUTOBAUDRATE

#define IS_UART_ADVFEATURE_AUTOBAUDRATE (   __AUTOBAUDRATE__)
Value:
(((__AUTOBAUDRATE__) == \
((__AUTOBAUDRATE__) == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE))
#define UART_ADVFEATURE_AUTOBAUDRATE_DISABLE
Definition: stm32h7xx_hal_uart.h:647
#define UART_ADVFEATURE_AUTOBAUDRATE_ENABLE
Definition: stm32h7xx_hal_uart.h:648

Ensure that UART auto Baud rate state is valid.

Parameters
__AUTOBAUDRATE__UART auto Baud rate state.
Return values
SET(AUTOBAUDRATE is valid) or RESET (AUTOBAUDRATE is invalid)

◆ IS_UART_ADVFEATURE_AUTOBAUDRATEMODE

#define IS_UART_ADVFEATURE_AUTOBAUDRATEMODE (   __MODE__)
Value:
#define UART_ADVFEATURE_AUTOBAUDRATE_ON0X7FFRAME
Definition: stm32h7xx_hal_uart.h:485
#define UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT
Definition: stm32h7xx_hal_uart.h:481
#define UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE
Definition: stm32h7xx_hal_uart.h:483
#define UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME
Definition: stm32h7xx_hal_uart.h:487

Ensure that UART auto Baud rate detection mode is valid.

Parameters
__MODE__UART auto Baud rate detection mode.
Return values
SET(MODE is valid) or RESET (MODE is invalid)

◆ IS_UART_ADVFEATURE_DATAINV

#define IS_UART_ADVFEATURE_DATAINV (   __DATAINV__)
Value:
(((__DATAINV__) == UART_ADVFEATURE_DATAINV_DISABLE) || \
((__DATAINV__) == UART_ADVFEATURE_DATAINV_ENABLE))
#define UART_ADVFEATURE_DATAINV_ENABLE
Definition: stm32h7xx_hal_uart.h:618
#define UART_ADVFEATURE_DATAINV_DISABLE
Definition: stm32h7xx_hal_uart.h:617

Ensure that UART frame data inversion setting is valid.

Parameters
__DATAINV__UART frame data inversion setting.
Return values
SET(DATAINV is valid) or RESET (DATAINV is invalid)

◆ IS_UART_ADVFEATURE_DMAONRXERROR

#define IS_UART_ADVFEATURE_DMAONRXERROR (   __DMA__)
Value:
#define UART_ADVFEATURE_DMA_ENABLEONRXERROR
Definition: stm32h7xx_hal_uart.h:657
#define UART_ADVFEATURE_DMA_DISABLEONRXERROR
Definition: stm32h7xx_hal_uart.h:658

Ensure that UART DMA enabling or disabling on error setting is valid.

Parameters
__DMA__UART DMA enabling or disabling on error setting.
Return values
SET(DMA is valid) or RESET (DMA is invalid)

◆ IS_UART_ADVFEATURE_INIT

#define IS_UART_ADVFEATURE_INIT (   __INIT__)
Value:
((__INIT__) <= (UART_ADVFEATURE_NO_INIT | \
#define UART_ADVFEATURE_RXOVERRUNDISABLE_INIT
Definition: stm32h7xx_hal_uart.h:585
#define UART_ADVFEATURE_AUTOBAUDRATE_INIT
Definition: stm32h7xx_hal_uart.h:587
#define UART_ADVFEATURE_TXINVERT_INIT
Definition: stm32h7xx_hal_uart.h:581
#define UART_ADVFEATURE_DATAINVERT_INIT
Definition: stm32h7xx_hal_uart.h:583
#define UART_ADVFEATURE_SWAP_INIT
Definition: stm32h7xx_hal_uart.h:584
#define UART_ADVFEATURE_MSBFIRST_INIT
Definition: stm32h7xx_hal_uart.h:588
#define UART_ADVFEATURE_NO_INIT
Definition: stm32h7xx_hal_uart.h:580
#define UART_ADVFEATURE_RXINVERT_INIT
Definition: stm32h7xx_hal_uart.h:582
#define UART_ADVFEATURE_DMADISABLEONERROR_INIT
Definition: stm32h7xx_hal_uart.h:586

Ensure that UART advanced features initialization is valid.

Parameters
__INIT__UART advanced features initialization.
Return values
SET(INIT is valid) or RESET (INIT is invalid)

◆ IS_UART_ADVFEATURE_MSBFIRST

#define IS_UART_ADVFEATURE_MSBFIRST (   __MSBFIRST__)
Value:
(((__MSBFIRST__) == UART_ADVFEATURE_MSBFIRST_DISABLE) || \
((__MSBFIRST__) == UART_ADVFEATURE_MSBFIRST_ENABLE))
#define UART_ADVFEATURE_MSBFIRST_DISABLE
Definition: stm32h7xx_hal_uart.h:667
#define UART_ADVFEATURE_MSBFIRST_ENABLE
Definition: stm32h7xx_hal_uart.h:669

Ensure that UART frame MSB first setting is valid.

Parameters
__MSBFIRST__UART frame MSB first setting.
Return values
SET(MSBFIRST is valid) or RESET (MSBFIRST is invalid)

◆ IS_UART_ADVFEATURE_RXINV

#define IS_UART_ADVFEATURE_RXINV (   __RXINV__)
Value:
(((__RXINV__) == UART_ADVFEATURE_RXINV_DISABLE) || \
((__RXINV__) == UART_ADVFEATURE_RXINV_ENABLE))
#define UART_ADVFEATURE_RXINV_ENABLE
Definition: stm32h7xx_hal_uart.h:608
#define UART_ADVFEATURE_RXINV_DISABLE
Definition: stm32h7xx_hal_uart.h:607

Ensure that UART frame RX inversion setting is valid.

Parameters
__RXINV__UART frame RX inversion setting.
Return values
SET(RXINV is valid) or RESET (RXINV is invalid)

◆ IS_UART_ADVFEATURE_STOPMODE

#define IS_UART_ADVFEATURE_STOPMODE (   __STOPMODE__)
Value:
(((__STOPMODE__) == UART_ADVFEATURE_STOPMODE_DISABLE) || \
((__STOPMODE__) == UART_ADVFEATURE_STOPMODE_ENABLE))
#define UART_ADVFEATURE_STOPMODE_DISABLE
Definition: stm32h7xx_hal_uart.h:679
#define UART_ADVFEATURE_STOPMODE_ENABLE
Definition: stm32h7xx_hal_uart.h:680

Ensure that UART stop mode state is valid.

Parameters
__STOPMODE__UART stop mode state.
Return values
SET(STOPMODE is valid) or RESET (STOPMODE is invalid)

◆ IS_UART_ADVFEATURE_SWAP

#define IS_UART_ADVFEATURE_SWAP (   __SWAP__)
Value:
(((__SWAP__) == UART_ADVFEATURE_SWAP_DISABLE) || \
((__SWAP__) == UART_ADVFEATURE_SWAP_ENABLE))
#define UART_ADVFEATURE_SWAP_ENABLE
Definition: stm32h7xx_hal_uart.h:628
#define UART_ADVFEATURE_SWAP_DISABLE
Definition: stm32h7xx_hal_uart.h:627

Ensure that UART frame RX/TX pins swap setting is valid.

Parameters
__SWAP__UART frame RX/TX pins swap setting.
Return values
SET(SWAP is valid) or RESET (SWAP is invalid)

◆ IS_UART_ADVFEATURE_TXINV

#define IS_UART_ADVFEATURE_TXINV (   __TXINV__)
Value:
(((__TXINV__) == UART_ADVFEATURE_TXINV_DISABLE) || \
((__TXINV__) == UART_ADVFEATURE_TXINV_ENABLE))
#define UART_ADVFEATURE_TXINV_ENABLE
Definition: stm32h7xx_hal_uart.h:598
#define UART_ADVFEATURE_TXINV_DISABLE
Definition: stm32h7xx_hal_uart.h:597

Ensure that UART frame TX inversion setting is valid.

Parameters
__TXINV__UART frame TX inversion setting.
Return values
SET(TXINV is valid) or RESET (TXINV is invalid)

◆ IS_UART_ASSERTIONTIME

#define IS_UART_ASSERTIONTIME (   __TIME__)    ((__TIME__) <= 0x1FU)

Check UART assertion time.

Parameters
__TIME__5-bit value assertion time.
Return values
Testresult (TRUE or FALSE).

◆ IS_UART_BAUDRATE

#define IS_UART_BAUDRATE (   __BAUDRATE__)    ((__BAUDRATE__) < 12500001U)

Check UART Baud rate.

Parameters
__BAUDRATE__Baudrate specified by the user. The maximum Baud Rate is derived from the maximum clock on H7 (i.e. 100 MHz) divided by the smallest oversampling used on the USART (i.e. 8)
Return values
SET(BAUDRATE is valid) or RESET (BAUDRATE is invalid)

◆ IS_UART_DE_POLARITY

#define IS_UART_DE_POLARITY (   __POLARITY__)
Value:
(((__POLARITY__) == UART_DE_POLARITY_HIGH) || \
((__POLARITY__) == UART_DE_POLARITY_LOW))
#define UART_DE_POLARITY_HIGH
Definition: stm32h7xx_hal_uart.h:720
#define UART_DE_POLARITY_LOW
Definition: stm32h7xx_hal_uart.h:721

Ensure that UART driver enable polarity is valid.

Parameters
__POLARITY__UART driver enable polarity.
Return values
SET(POLARITY is valid) or RESET (POLARITY is invalid)

◆ IS_UART_DEASSERTIONTIME

#define IS_UART_DEASSERTIONTIME (   __TIME__)    ((__TIME__) <= 0x1FU)

Check UART deassertion time.

Parameters
__TIME__5-bit value deassertion time.
Return values
Testresult (TRUE or FALSE).

◆ IS_UART_DMA_RX

#define IS_UART_DMA_RX (   __DMARX__)
Value:
(((__DMARX__) == UART_DMA_RX_DISABLE) || \
((__DMARX__) == UART_DMA_RX_ENABLE))
#define UART_DMA_RX_ENABLE
Definition: stm32h7xx_hal_uart.h:538
#define UART_DMA_RX_DISABLE
Definition: stm32h7xx_hal_uart.h:537

Ensure that UART DMA RX state is valid.

Parameters
__DMARX__UART DMA RX state.
Return values
SET(DMARX is valid) or RESET (DMARX is invalid)

◆ IS_UART_DMA_TX

#define IS_UART_DMA_TX (   __DMATX__)
Value:
(((__DMATX__) == UART_DMA_TX_DISABLE) || \
((__DMATX__) == UART_DMA_TX_ENABLE))
#define UART_DMA_TX_DISABLE
Definition: stm32h7xx_hal_uart.h:527
#define UART_DMA_TX_ENABLE
Definition: stm32h7xx_hal_uart.h:528

Ensure that UART DMA TX state is valid.

Parameters
__DMATX__UART DMA TX state.
Return values
SET(DMATX is valid) or RESET (DMATX is invalid)

◆ IS_UART_HALF_DUPLEX

#define IS_UART_HALF_DUPLEX (   __HDSEL__)
Value:
(((__HDSEL__) == UART_HALF_DUPLEX_DISABLE) || \
((__HDSEL__) == UART_HALF_DUPLEX_ENABLE))
#define UART_HALF_DUPLEX_DISABLE
Definition: stm32h7xx_hal_uart.h:547
#define UART_HALF_DUPLEX_ENABLE
Definition: stm32h7xx_hal_uart.h:548

Ensure that UART half-duplex state is valid.

Parameters
__HDSEL__UART half-duplex state.
Return values
SET(HDSEL is valid) or RESET (HDSEL is invalid)

◆ IS_UART_HARDWARE_FLOW_CONTROL

#define IS_UART_HARDWARE_FLOW_CONTROL (   __CONTROL__)
Value:
(((__CONTROL__) == UART_HWCONTROL_NONE) || \
((__CONTROL__) == UART_HWCONTROL_RTS) || \
((__CONTROL__) == UART_HWCONTROL_CTS) || \
((__CONTROL__) == UART_HWCONTROL_RTS_CTS))
#define UART_HWCONTROL_CTS
Definition: stm32h7xx_hal_uart.h:410
#define UART_HWCONTROL_RTS
Definition: stm32h7xx_hal_uart.h:409
#define UART_HWCONTROL_RTS_CTS
Definition: stm32h7xx_hal_uart.h:411
#define UART_HWCONTROL_NONE
Definition: stm32h7xx_hal_uart.h:408

Ensure that UART hardware flow control is valid.

Parameters
__CONTROL__UART hardware flow control.
Return values
SET(CONTROL is valid) or RESET (CONTROL is invalid)

◆ IS_UART_LIN

#define IS_UART_LIN (   __LIN__)
Value:
(((__LIN__) == UART_LIN_DISABLE) || \
((__LIN__) == UART_LIN_ENABLE))
#define UART_LIN_DISABLE
Definition: stm32h7xx_hal_uart.h:507
#define UART_LIN_ENABLE
Definition: stm32h7xx_hal_uart.h:508

Ensure that UART LIN state is valid.

Parameters
__LIN__UART LIN state.
Return values
SET(LIN is valid) or RESET (LIN is invalid)

◆ IS_UART_LIN_BREAK_DETECT_LENGTH

#define IS_UART_LIN_BREAK_DETECT_LENGTH (   __LENGTH__)
Value:
(((__LENGTH__) == UART_LINBREAKDETECTLENGTH_10B) || \
((__LENGTH__) == UART_LINBREAKDETECTLENGTH_11B))
#define UART_LINBREAKDETECTLENGTH_10B
Definition: stm32h7xx_hal_uart.h:517
#define UART_LINBREAKDETECTLENGTH_11B
Definition: stm32h7xx_hal_uart.h:518

Ensure that UART LIN break detection length is valid.

Parameters
__LENGTH__UART LIN break detection length.
Return values
SET(LENGTH is valid) or RESET (LENGTH is invalid)

◆ IS_UART_MODE

#define IS_UART_MODE (   __MODE__)    ((((__MODE__) & (~((uint32_t)(UART_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U))

Ensure that UART communication mode is valid.

Parameters
__MODE__UART communication mode.
Return values
SET(MODE is valid) or RESET (MODE is invalid)

◆ IS_UART_MUTE_MODE

#define IS_UART_MUTE_MODE (   __MUTE__)
Value:
(((__MUTE__) == UART_ADVFEATURE_MUTEMODE_DISABLE) || \
#define UART_ADVFEATURE_MUTEMODE_DISABLE
Definition: stm32h7xx_hal_uart.h:689
#define UART_ADVFEATURE_MUTEMODE_ENABLE
Definition: stm32h7xx_hal_uart.h:690

Ensure that UART mute mode state is valid.

Parameters
__MUTE__UART mute mode state.
Return values
SET(MUTE is valid) or RESET (MUTE is invalid)

◆ IS_UART_ONE_BIT_SAMPLE

#define IS_UART_ONE_BIT_SAMPLE (   __ONEBIT__)
Value:
(((__ONEBIT__) == UART_ONE_BIT_SAMPLE_DISABLE) || \
((__ONEBIT__) == UART_ONE_BIT_SAMPLE_ENABLE))
#define UART_ONE_BIT_SAMPLE_ENABLE
Definition: stm32h7xx_hal_uart.h:452
#define UART_ONE_BIT_SAMPLE_DISABLE
Definition: stm32h7xx_hal_uart.h:451

Ensure that UART frame sampling is valid.

Parameters
__ONEBIT__UART frame sampling.
Return values
SET(ONEBIT is valid) or RESET (ONEBIT is invalid)

◆ IS_UART_OVERRUN

#define IS_UART_OVERRUN (   __OVERRUN__)
Value:
(((__OVERRUN__) == UART_ADVFEATURE_OVERRUN_ENABLE) || \
((__OVERRUN__) == UART_ADVFEATURE_OVERRUN_DISABLE))
#define UART_ADVFEATURE_OVERRUN_DISABLE
Definition: stm32h7xx_hal_uart.h:638
#define UART_ADVFEATURE_OVERRUN_ENABLE
Definition: stm32h7xx_hal_uart.h:637

Ensure that UART frame overrun setting is valid.

Parameters
__OVERRUN__UART frame overrun setting.
Return values
SET(OVERRUN is valid) or RESET (OVERRUN is invalid)

◆ IS_UART_OVERSAMPLING

#define IS_UART_OVERSAMPLING (   __SAMPLING__)
Value:
(((__SAMPLING__) == UART_OVERSAMPLING_16) || \
((__SAMPLING__) == UART_OVERSAMPLING_8))
#define UART_OVERSAMPLING_16
Definition: stm32h7xx_hal_uart.h:441
#define UART_OVERSAMPLING_8
Definition: stm32h7xx_hal_uart.h:442

Ensure that UART oversampling is valid.

Parameters
__SAMPLING__UART oversampling.
Return values
SET(SAMPLING is valid) or RESET (SAMPLING is invalid)

◆ IS_UART_PARITY

#define IS_UART_PARITY (   __PARITY__)
Value:
(((__PARITY__) == UART_PARITY_NONE) || \
((__PARITY__) == UART_PARITY_EVEN) || \
((__PARITY__) == UART_PARITY_ODD))
#define UART_PARITY_EVEN
Definition: stm32h7xx_hal_uart.h:398
#define UART_PARITY_ODD
Definition: stm32h7xx_hal_uart.h:399
#define UART_PARITY_NONE
Definition: stm32h7xx_hal_uart.h:397

Ensure that UART frame parity is valid.

Parameters
__PARITY__UART frame parity.
Return values
SET(PARITY is valid) or RESET (PARITY is invalid)

◆ IS_UART_PRESCALER

#define IS_UART_PRESCALER (   __CLOCKPRESCALER__)
Value:
(((__CLOCKPRESCALER__) == UART_PRESCALER_DIV1) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV2) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV4) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV6) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV8) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV10) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV12) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV16) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV32) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV64) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV128) || \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV256))
#define UART_PRESCALER_DIV256
Definition: stm32h7xx_hal_uart.h:472
#define UART_PRESCALER_DIV10
Definition: stm32h7xx_hal_uart.h:466
#define UART_PRESCALER_DIV6
Definition: stm32h7xx_hal_uart.h:464
#define UART_PRESCALER_DIV1
Definition: stm32h7xx_hal_uart.h:461
#define UART_PRESCALER_DIV16
Definition: stm32h7xx_hal_uart.h:468
#define UART_PRESCALER_DIV8
Definition: stm32h7xx_hal_uart.h:465
#define UART_PRESCALER_DIV32
Definition: stm32h7xx_hal_uart.h:469
#define UART_PRESCALER_DIV4
Definition: stm32h7xx_hal_uart.h:463
#define UART_PRESCALER_DIV128
Definition: stm32h7xx_hal_uart.h:471
#define UART_PRESCALER_DIV2
Definition: stm32h7xx_hal_uart.h:462
#define UART_PRESCALER_DIV12
Definition: stm32h7xx_hal_uart.h:467
#define UART_PRESCALER_DIV64
Definition: stm32h7xx_hal_uart.h:470

Ensure that UART Prescaler is valid.

Parameters
__CLOCKPRESCALER__UART Prescaler value.
Return values
SET(CLOCKPRESCALER is valid) or RESET (CLOCKPRESCALER is invalid)

◆ IS_UART_RECEIVER_TIMEOUT

#define IS_UART_RECEIVER_TIMEOUT (   __TIMEOUT__)
Value:
(((__TIMEOUT__) == UART_RECEIVER_TIMEOUT_DISABLE) || \
((__TIMEOUT__) == UART_RECEIVER_TIMEOUT_ENABLE))
#define UART_RECEIVER_TIMEOUT_DISABLE
Definition: stm32h7xx_hal_uart.h:497
#define UART_RECEIVER_TIMEOUT_ENABLE
Definition: stm32h7xx_hal_uart.h:498

Ensure that UART receiver timeout setting is valid.

Parameters
__TIMEOUT__UART receiver timeout setting.
Return values
SET(TIMEOUT is valid) or RESET (TIMEOUT is invalid)

◆ IS_UART_RECEIVER_TIMEOUT_VALUE

#define IS_UART_RECEIVER_TIMEOUT_VALUE (   __TIMEOUTVALUE__)    ((__TIMEOUTVALUE__) <= 0xFFFFFFU)

Check the receiver timeout value.

Note
The maximum UART receiver timeout value is 0xFFFFFF.
Parameters
__TIMEOUTVALUE__receiver timeout value.
Return values
Testresult (TRUE or FALSE)

◆ IS_UART_REQUEST_PARAMETER

#define IS_UART_REQUEST_PARAMETER (   __PARAM__)
Value:
(((__PARAM__) == UART_AUTOBAUD_REQUEST) || \
((__PARAM__) == UART_SENDBREAK_REQUEST) || \
((__PARAM__) == UART_MUTE_MODE_REQUEST) || \
((__PARAM__) == UART_RXDATA_FLUSH_REQUEST) || \
((__PARAM__) == UART_TXDATA_FLUSH_REQUEST))
#define UART_SENDBREAK_REQUEST
Definition: stm32h7xx_hal_uart.h:568
#define UART_AUTOBAUD_REQUEST
Definition: stm32h7xx_hal_uart.h:567
#define UART_MUTE_MODE_REQUEST
Definition: stm32h7xx_hal_uart.h:569
#define UART_RXDATA_FLUSH_REQUEST
Definition: stm32h7xx_hal_uart.h:570
#define UART_TXDATA_FLUSH_REQUEST
Definition: stm32h7xx_hal_uart.h:571

Ensure that UART request parameter is valid.

Parameters
__PARAM__UART request parameter.
Return values
SET(PARAM is valid) or RESET (PARAM is invalid)

◆ IS_UART_STATE

#define IS_UART_STATE (   __STATE__)
Value:
(((__STATE__) == UART_STATE_DISABLE) || \
((__STATE__) == UART_STATE_ENABLE))
#define UART_STATE_ENABLE
Definition: stm32h7xx_hal_uart.h:432
#define UART_STATE_DISABLE
Definition: stm32h7xx_hal_uart.h:431

Ensure that UART state is valid.

Parameters
__STATE__UART state.
Return values
SET(STATE is valid) or RESET (STATE is invalid)

◆ IS_UART_STOPBITS

#define IS_UART_STOPBITS (   __STOPBITS__)
Value:
(((__STOPBITS__) == UART_STOPBITS_0_5) || \
((__STOPBITS__) == UART_STOPBITS_1) || \
((__STOPBITS__) == UART_STOPBITS_1_5) || \
((__STOPBITS__) == UART_STOPBITS_2))
#define UART_STOPBITS_0_5
Definition: stm32h7xx_hal_uart.h:385
#define UART_STOPBITS_1_5
Definition: stm32h7xx_hal_uart.h:387

Ensure that UART frame number of stop bits is valid.

Parameters
__STOPBITS__UART frame number of stop bits.
Return values
SET(STOPBITS is valid) or RESET (STOPBITS is invalid)

◆ IS_UART_WAKEUP_SELECTION

#define IS_UART_WAKEUP_SELECTION (   __WAKE__)
Value:
(((__WAKE__) == UART_WAKEUP_ON_ADDRESS) || \
((__WAKE__) == UART_WAKEUP_ON_STARTBIT) || \
#define UART_WAKEUP_ON_READDATA_NONEMPTY
Definition: stm32h7xx_hal_uart.h:710
#define UART_WAKEUP_ON_ADDRESS
Definition: stm32h7xx_hal_uart.h:708
#define UART_WAKEUP_ON_STARTBIT
Definition: stm32h7xx_hal_uart.h:709

Ensure that UART wake-up selection is valid.

Parameters
__WAKE__UART wake-up selection.
Return values
SET(WAKE is valid) or RESET (WAKE is invalid)

◆ IS_UART_WAKEUPMETHOD

#define IS_UART_WAKEUPMETHOD (   __WAKEUP__)
Value:
(((__WAKEUP__) == UART_WAKEUPMETHOD_IDLELINE) || \
((__WAKEUP__) == UART_WAKEUPMETHOD_ADDRESSMARK))
#define UART_WAKEUPMETHOD_IDLELINE
Definition: stm32h7xx_hal_uart.h:557
#define UART_WAKEUPMETHOD_ADDRESSMARK
Definition: stm32h7xx_hal_uart.h:558

Ensure that UART wake-up method is valid.

Parameters
__WAKEUP__UART wake-up method .
Return values
SET(WAKEUP is valid) or RESET (WAKEUP is invalid)

◆ UART_DIV_LPUART

#define UART_DIV_LPUART (   __PCLK__,
  __BAUD__,
  __CLOCKPRESCALER__ 
)
Value:
((uint32_t)((((((uint64_t)(__PCLK__))/(UARTPrescTable[(__CLOCKPRESCALER__)]))*256U)+ \
(uint32_t)((__BAUD__)/2U)) / (__BAUD__)) \
)

BRR division operation to set BRR register with LPUART.

Parameters
__PCLK__LPUART clock.
__BAUD__Baud rate set by the user.
__CLOCKPRESCALER__UART prescaler value.
Return values
Divisionresult

◆ UART_DIV_SAMPLING16

#define UART_DIV_SAMPLING16 (   __PCLK__,
  __BAUD__,
  __CLOCKPRESCALER__ 
)     ((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)]) + ((__BAUD__)/2U)) / (__BAUD__))

BRR division operation to set BRR register in 16-bit oversampling mode.

Parameters
__PCLK__UART clock.
__BAUD__Baud rate set by the user.
__CLOCKPRESCALER__UART prescaler value.
Return values
Divisionresult

◆ UART_DIV_SAMPLING8

#define UART_DIV_SAMPLING8 (   __PCLK__,
  __BAUD__,
  __CLOCKPRESCALER__ 
)     (((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)])*2U) + ((__BAUD__)/2U)) / (__BAUD__))

BRR division operation to set BRR register in 8-bit oversampling mode.

Parameters
__PCLK__UART clock.
__BAUD__Baud rate set by the user.
__CLOCKPRESCALER__UART prescaler value.
Return values
Divisionresult

◆ UART_GET_DIV_FACTOR

#define UART_GET_DIV_FACTOR (   __CLOCKPRESCALER__)
Value:
(((__CLOCKPRESCALER__) == UART_PRESCALER_DIV1) ? 1U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV2) ? 2U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV4) ? 4U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV6) ? 6U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV8) ? 8U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV10) ? 10U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV12) ? 12U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV16) ? 16U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV32) ? 32U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV64) ? 64U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV128) ? 128U : \
((__CLOCKPRESCALER__) == UART_PRESCALER_DIV256) ? 256U : 1U)

Get UART clok division factor from clock prescaler value.

Parameters
__CLOCKPRESCALER__UART prescaler value.
Return values
UARTclock division factor

◆ UART_INSTANCE_LOWPOWER

#define UART_INSTANCE_LOWPOWER (   __HANDLE__)    (IS_LPUART_INSTANCE((__HANDLE__)->Instance))

Check whether or not UART instance is Low Power UART.

Parameters
__HANDLE__specifies the UART Handle.
Return values
SET(instance is LPUART) or RESET (instance isn't LPUART)