STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
UART Private Macros
Collaboration diagram for UART Private Macros:

Macros

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

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
UART frame with 1 stop bit.
#define UART_STOPBITS_2
UART frame with 2 stop bits.

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)

Definition at line 1321 of file stm32h7xx_hal_uart.h.

◆ IS_UART_ADVFEATURE_AUTOBAUDRATE

#define IS_UART_ADVFEATURE_AUTOBAUDRATE ( __AUTOBAUDRATE__)
Value:
(((__AUTOBAUDRATE__) == \
((__AUTOBAUDRATE__) == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE))
#define UART_ADVFEATURE_AUTOBAUDRATE_DISABLE
RX Auto Baud rate detection enable.
#define UART_ADVFEATURE_AUTOBAUDRATE_ENABLE
RX Auto Baud rate detection disable.

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)

Definition at line 1519 of file stm32h7xx_hal_uart.h.

◆ IS_UART_ADVFEATURE_AUTOBAUDRATEMODE

#define IS_UART_ADVFEATURE_AUTOBAUDRATEMODE ( __MODE__)
Value:
#define UART_ADVFEATURE_AUTOBAUDRATE_ON0X7FFRAME
Auto Baud rate detection on 0x7F frame detection.
#define UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT
Auto Baud rate detection on start bit.
#define UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE
Auto Baud rate detection on falling edge.
#define UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME
Auto Baud rate detection on 0x55 frame detection.

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)

Definition at line 1380 of file stm32h7xx_hal_uart.h.

◆ 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
Binary data inversion enable.
#define UART_ADVFEATURE_DATAINV_DISABLE
Binary data inversion disable.

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)

Definition at line 1495 of file stm32h7xx_hal_uart.h.

◆ IS_UART_ADVFEATURE_DMAONRXERROR

#define IS_UART_ADVFEATURE_DMAONRXERROR ( __DMA__)
Value:
#define UART_ADVFEATURE_DMA_ENABLEONRXERROR
DMA enable on Reception Error.
#define UART_ADVFEATURE_DMA_DISABLEONRXERROR
DMA disable on Reception Error.

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)

Definition at line 1528 of file stm32h7xx_hal_uart.h.

◆ IS_UART_ADVFEATURE_INIT

#define IS_UART_ADVFEATURE_INIT ( __INIT__)
Value:
((__INIT__) <= (UART_ADVFEATURE_NO_INIT | \
#define UART_ADVFEATURE_RXOVERRUNDISABLE_INIT
RX overrun disable.
#define UART_ADVFEATURE_AUTOBAUDRATE_INIT
Auto Baud rate detection initialization.
#define UART_ADVFEATURE_TXINVERT_INIT
TX pin active level inversion.
#define UART_ADVFEATURE_DATAINVERT_INIT
Binary data inversion.
#define UART_ADVFEATURE_SWAP_INIT
TX/RX pins swap.
#define UART_ADVFEATURE_MSBFIRST_INIT
Most significant bit sent/received first.
#define UART_ADVFEATURE_NO_INIT
No advanced feature initialization.
#define UART_ADVFEATURE_RXINVERT_INIT
RX pin active level inversion.
#define UART_ADVFEATURE_DMADISABLEONERROR_INIT
DMA disable on Reception Error.

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)

Definition at line 1464 of file stm32h7xx_hal_uart.h.

◆ 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
Most significant bit sent/received first disable.
#define UART_ADVFEATURE_MSBFIRST_ENABLE
Most significant bit sent/received first enable.

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)

Definition at line 1536 of file stm32h7xx_hal_uart.h.

◆ 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
RX pin active level inversion enable.
#define UART_ADVFEATURE_RXINV_DISABLE
RX pin active level inversion disable.

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)

Definition at line 1487 of file stm32h7xx_hal_uart.h.

◆ 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
UART stop mode disable.
#define UART_ADVFEATURE_STOPMODE_ENABLE
UART stop mode enable.

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)

Definition at line 1544 of file stm32h7xx_hal_uart.h.

◆ 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
TX/RX pins swap enable.
#define UART_ADVFEATURE_SWAP_DISABLE
TX/RX pins swap disable.

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)

Definition at line 1503 of file stm32h7xx_hal_uart.h.

◆ 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
TX pin active level inversion enable.
#define UART_ADVFEATURE_TXINV_DISABLE
TX pin active level inversion disable.

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)

Definition at line 1479 of file stm32h7xx_hal_uart.h.

◆ IS_UART_ASSERTIONTIME

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

Check UART assertion time.

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

Definition at line 1298 of file stm32h7xx_hal_uart.h.

◆ IS_UART_BAUDRATE

#define IS_UART_BAUDRATE ( __BAUDRATE__)
Value:
((__BAUDRATE__) <= 12500000U)

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)

Definition at line 1292 of file stm32h7xx_hal_uart.h.

◆ 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
Driver enable signal is active high.
#define UART_DE_POLARITY_LOW
Driver enable signal is active low.

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)

Definition at line 1569 of file stm32h7xx_hal_uart.h.

◆ IS_UART_DEASSERTIONTIME

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

Check UART deassertion time.

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

Definition at line 1304 of file stm32h7xx_hal_uart.h.

◆ 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
UART DMA RX enabled.
#define UART_DMA_RX_DISABLE
UART DMA RX disabled.

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)

Definition at line 1429 of file stm32h7xx_hal_uart.h.

◆ 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
UART DMA TX disabled.
#define UART_DMA_TX_ENABLE
UART DMA TX enabled.

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)

Definition at line 1421 of file stm32h7xx_hal_uart.h.

◆ 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
UART half-duplex disabled.
#define UART_HALF_DUPLEX_ENABLE
UART half-duplex enabled.

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)

Definition at line 1437 of file stm32h7xx_hal_uart.h.

◆ 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
Clear To Send.
#define UART_HWCONTROL_RTS
Request To Send.
#define UART_HWCONTROL_RTS_CTS
Request and Clear To Send.
#define UART_HWCONTROL_NONE
No hardware control.

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)

Definition at line 1338 of file stm32h7xx_hal_uart.h.

◆ IS_UART_LIN

#define IS_UART_LIN ( __LIN__)
Value:
(((__LIN__) == UART_LIN_DISABLE) || \
((__LIN__) == UART_LIN_ENABLE))
#define UART_LIN_DISABLE
Local Interconnect Network disable.
#define UART_LIN_ENABLE
Local Interconnect Network enable.

Ensure that UART LIN state is valid.

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

Definition at line 1405 of file stm32h7xx_hal_uart.h.

◆ 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
LIN 10-bit break detection length.
#define UART_LINBREAKDETECTLENGTH_11B
LIN 11-bit break detection length.

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)

Definition at line 1413 of file stm32h7xx_hal_uart.h.

◆ IS_UART_MODE

#define IS_UART_MODE ( __MODE__)
Value:
((((__MODE__) & (~((uint32_t)(UART_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U))
#define UART_MODE_TX_RX
RX and TX mode.

Ensure that UART communication mode is valid.

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

Definition at line 1349 of file stm32h7xx_hal_uart.h.

◆ IS_UART_MUTE_MODE

#define IS_UART_MUTE_MODE ( __MUTE__)
Value:
(((__MUTE__) == UART_ADVFEATURE_MUTEMODE_DISABLE) || \
#define UART_ADVFEATURE_MUTEMODE_DISABLE
UART mute mode disable.
#define UART_ADVFEATURE_MUTEMODE_ENABLE
UART mute mode enable.

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)

Definition at line 1552 of file stm32h7xx_hal_uart.h.

◆ 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
One-bit sampling enable.
#define UART_ONE_BIT_SAMPLE_DISABLE
One-bit sampling disable.

Ensure that UART frame sampling is valid.

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

Definition at line 1372 of file stm32h7xx_hal_uart.h.

◆ IS_UART_OVERRUN

#define IS_UART_OVERRUN ( __OVERRUN__)
Value:
(((__OVERRUN__) == UART_ADVFEATURE_OVERRUN_ENABLE) || \
((__OVERRUN__) == UART_ADVFEATURE_OVERRUN_DISABLE))
#define UART_ADVFEATURE_OVERRUN_DISABLE
RX overrun disable.
#define UART_ADVFEATURE_OVERRUN_ENABLE
RX overrun enable.

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)

Definition at line 1511 of file stm32h7xx_hal_uart.h.

◆ IS_UART_OVERSAMPLING

#define IS_UART_OVERSAMPLING ( __SAMPLING__)
Value:
(((__SAMPLING__) == UART_OVERSAMPLING_16) || \
((__SAMPLING__) == UART_OVERSAMPLING_8))
#define UART_OVERSAMPLING_16
Oversampling by 16.
#define UART_OVERSAMPLING_8
Oversampling by 8.

Ensure that UART oversampling is valid.

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

Definition at line 1364 of file stm32h7xx_hal_uart.h.

◆ 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
Even parity.
#define UART_PARITY_ODD
Odd parity.
#define UART_PARITY_NONE
No parity.

Ensure that UART frame parity is valid.

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

Definition at line 1329 of file stm32h7xx_hal_uart.h.

◆ 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
fclk_pres = fclk/256
#define UART_PRESCALER_DIV10
fclk_pres = fclk/10
#define UART_PRESCALER_DIV6
fclk_pres = fclk/6
#define UART_PRESCALER_DIV1
fclk_pres = fclk
#define UART_PRESCALER_DIV16
fclk_pres = fclk/16
#define UART_PRESCALER_DIV8
fclk_pres = fclk/8
#define UART_PRESCALER_DIV32
fclk_pres = fclk/32
#define UART_PRESCALER_DIV4
fclk_pres = fclk/4
#define UART_PRESCALER_DIV128
fclk_pres = fclk/128
#define UART_PRESCALER_DIV2
fclk_pres = fclk/2
#define UART_PRESCALER_DIV12
fclk_pres = fclk/12
#define UART_PRESCALER_DIV64
fclk_pres = fclk/64

Ensure that UART Prescaler is valid.

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

Definition at line 1577 of file stm32h7xx_hal_uart.h.

◆ 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
UART Receiver Timeout disable.
#define UART_RECEIVER_TIMEOUT_ENABLE
UART Receiver Timeout enable.

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)

Definition at line 1390 of file stm32h7xx_hal_uart.h.

◆ IS_UART_RECEIVER_TIMEOUT_VALUE

#define IS_UART_RECEIVER_TIMEOUT_VALUE ( __TIMEOUTVALUE__)
Value:
((__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)

Definition at line 1398 of file stm32h7xx_hal_uart.h.

◆ 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
Send Break Request.
#define UART_AUTOBAUD_REQUEST
Auto-Baud Rate Request.
#define UART_MUTE_MODE_REQUEST
Mute Mode Request.
#define UART_RXDATA_FLUSH_REQUEST
Receive Data flush Request.
#define UART_TXDATA_FLUSH_REQUEST
Transmit data flush Request.

Ensure that UART request parameter is valid.

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

Definition at line 1453 of file stm32h7xx_hal_uart.h.

◆ IS_UART_STATE

#define IS_UART_STATE ( __STATE__)
Value:
(((__STATE__) == UART_STATE_DISABLE) || \
((__STATE__) == UART_STATE_ENABLE))
#define UART_STATE_ENABLE
UART enabled.
#define UART_STATE_DISABLE
UART disabled.

Ensure that UART state is valid.

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

Definition at line 1356 of file stm32h7xx_hal_uart.h.

◆ 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
UART frame with 0.5 stop bit.
#define UART_STOPBITS_1_5
UART frame with 1.5 stop bits.

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)

Definition at line 1311 of file stm32h7xx_hal_uart.h.

◆ 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
UART wake-up on receive data register not empty or RXFIFO is not empty.
#define UART_WAKEUP_ON_ADDRESS
UART wake-up on address.
#define UART_WAKEUP_ON_STARTBIT
UART wake-up on start bit.

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)

Definition at line 1560 of file stm32h7xx_hal_uart.h.

◆ IS_UART_WAKEUPMETHOD

#define IS_UART_WAKEUPMETHOD ( __WAKEUP__)
Value:
(((__WAKEUP__) == UART_WAKEUPMETHOD_IDLELINE) || \
((__WAKEUP__) == UART_WAKEUPMETHOD_ADDRESSMARK))
#define UART_WAKEUPMETHOD_IDLELINE
UART wake-up on idle line.
#define UART_WAKEUPMETHOD_ADDRESSMARK
UART wake-up on address mark.

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)

Definition at line 1445 of file stm32h7xx_hal_uart.h.

◆ UART_DIV_LPUART

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

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

Definition at line 1257 of file stm32h7xx_hal_uart.h.

◆ UART_DIV_SAMPLING16

#define UART_DIV_SAMPLING16 ( __PCLK__,
__BAUD__,
__CLOCKPRESCALER__ )
Value:
((((__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

Definition at line 1277 of file stm32h7xx_hal_uart.h.

◆ UART_DIV_SAMPLING8

#define UART_DIV_SAMPLING8 ( __PCLK__,
__BAUD__,
__CLOCKPRESCALER__ )
Value:
(((((__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

Definition at line 1268 of file stm32h7xx_hal_uart.h.

◆ 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 : 256U)

Get UART clock division factor from clock prescaler value.

Parameters
__CLOCKPRESCALER__UART prescaler value.
Return values
UARTclock division factor

Definition at line 1238 of file stm32h7xx_hal_uart.h.

◆ UART_INSTANCE_LOWPOWER

#define UART_INSTANCE_LOWPOWER ( __HANDLE__)
Value:
(IS_LPUART_INSTANCE((__HANDLE__)->Instance))
#define IS_LPUART_INSTANCE(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)

Definition at line 1284 of file stm32h7xx_hal_uart.h.