My Project
Loading...
Searching...
No Matches
UART Private Macros

Macros

#define UART_DIV_SAMPLING8(__PCLK__, __BAUD__)   ((((__PCLK__)*2U) + ((__BAUD__)/2U)) / (__BAUD__))
 BRR division operation to set BRR register in 8-bit oversampling mode.
 
#define UART_DIV_SAMPLING16(__PCLK__, __BAUD__)   (((__PCLK__) + ((__BAUD__)/2U)) / (__BAUD__))
 BRR division operation to set BRR register in 16-bit oversampling mode.
 
#define IS_UART_BAUDRATE(__BAUDRATE__)   ((__BAUDRATE__) < 9000001U)
 Check UART Baud rate.
 
#define IS_UART_ASSERTIONTIME(__TIME__)   ((__TIME__) <= 0x1FU)
 Check UART assertion time.
 
#define IS_UART_DEASSERTIONTIME(__TIME__)   ((__TIME__) <= 0x1FU)
 Check UART deassertion time.
 
#define IS_UART_STOPBITS(__STOPBITS__)
 Ensure that UART 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__)   ((((__MODE__) & (~((uint32_t)(UART_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U))
 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__)   ((__TIMEOUTVALUE__) <= 0xFFFFFFU)
 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.
 

Detailed Description

Macro Definition Documentation

◆ IS_UART_ADVFEATURE_AUTOBAUDRATE

#define IS_UART_ADVFEATURE_AUTOBAUDRATE (   __AUTOBAUDRATE__)
Value:
(((__AUTOBAUDRATE__) == \
((__AUTOBAUDRATE__) == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE))
#define UART_ADVFEATURE_AUTOBAUDRATE_DISABLE
Definition: stm32f3xx_hal_uart.h:578
#define UART_ADVFEATURE_AUTOBAUDRATE_ENABLE
Definition: stm32f3xx_hal_uart.h:579

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: stm32f3xx_hal_uart.h:431
#define UART_ADVFEATURE_AUTOBAUDRATE_ONSTARTBIT
Definition: stm32f3xx_hal_uart.h:427
#define UART_ADVFEATURE_AUTOBAUDRATE_ONFALLINGEDGE
Definition: stm32f3xx_hal_uart.h:429
#define UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME
Definition: stm32f3xx_hal_uart.h:433

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: stm32f3xx_hal_uart.h:552
#define UART_ADVFEATURE_DATAINV_DISABLE
Definition: stm32f3xx_hal_uart.h:551

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: stm32f3xx_hal_uart.h:587
#define UART_ADVFEATURE_DMA_DISABLEONRXERROR
Definition: stm32f3xx_hal_uart.h:588

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: stm32f3xx_hal_uart.h:522
#define UART_ADVFEATURE_AUTOBAUDRATE_INIT
Definition: stm32f3xx_hal_uart.h:524
#define UART_ADVFEATURE_TXINVERT_INIT
Definition: stm32f3xx_hal_uart.h:518
#define UART_ADVFEATURE_DATAINVERT_INIT
Definition: stm32f3xx_hal_uart.h:520
#define UART_ADVFEATURE_SWAP_INIT
Definition: stm32f3xx_hal_uart.h:521
#define UART_ADVFEATURE_MSBFIRST_INIT
Definition: stm32f3xx_hal_uart.h:525
#define UART_ADVFEATURE_NO_INIT
Definition: stm32f3xx_hal_uart.h:517
#define UART_ADVFEATURE_RXINVERT_INIT
Definition: stm32f3xx_hal_uart.h:519
#define UART_ADVFEATURE_DMADISABLEONERROR_INIT
Definition: stm32f3xx_hal_uart.h:523

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: stm32f3xx_hal_uart.h:596
#define UART_ADVFEATURE_MSBFIRST_ENABLE
Definition: stm32f3xx_hal_uart.h:598

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: stm32f3xx_hal_uart.h:543
#define UART_ADVFEATURE_RXINV_DISABLE
Definition: stm32f3xx_hal_uart.h:542

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: stm32f3xx_hal_uart.h:607
#define UART_ADVFEATURE_STOPMODE_ENABLE
Definition: stm32f3xx_hal_uart.h:608

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: stm32f3xx_hal_uart.h:561
#define UART_ADVFEATURE_SWAP_DISABLE
Definition: stm32f3xx_hal_uart.h:560

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: stm32f3xx_hal_uart.h:534
#define UART_ADVFEATURE_TXINV_DISABLE
Definition: stm32f3xx_hal_uart.h:533

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__) < 9000001U)

Check UART Baud rate.

Parameters
__BAUDRATE__Baudrate specified by the user. The maximum Baud Rate is derived from the maximum clock on F3 (i.e. 72 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: stm32f3xx_hal_uart.h:644
#define UART_DE_POLARITY_LOW
Definition: stm32f3xx_hal_uart.h:645

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: stm32f3xx_hal_uart.h:479
#define UART_DMA_RX_DISABLE
Definition: stm32f3xx_hal_uart.h:478

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: stm32f3xx_hal_uart.h:469
#define UART_DMA_TX_ENABLE
Definition: stm32f3xx_hal_uart.h:470

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: stm32f3xx_hal_uart.h:487
#define UART_HALF_DUPLEX_ENABLE
Definition: stm32f3xx_hal_uart.h:488

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: stm32f3xx_hal_uart.h:381
#define UART_HWCONTROL_RTS
Definition: stm32f3xx_hal_uart.h:380
#define UART_HWCONTROL_RTS_CTS
Definition: stm32f3xx_hal_uart.h:382
#define UART_HWCONTROL_NONE
Definition: stm32f3xx_hal_uart.h:379

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: stm32f3xx_hal_uart.h:451
#define UART_LIN_ENABLE
Definition: stm32f3xx_hal_uart.h:452

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: stm32f3xx_hal_uart.h:460
#define UART_LINBREAKDETECTLENGTH_11B
Definition: stm32f3xx_hal_uart.h:461

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: stm32f3xx_hal_uart.h:616
#define UART_ADVFEATURE_MUTEMODE_ENABLE
Definition: stm32f3xx_hal_uart.h:617

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: stm32f3xx_hal_uart.h:419
#define UART_ONE_BIT_SAMPLE_DISABLE
Definition: stm32f3xx_hal_uart.h:418

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: stm32f3xx_hal_uart.h:570
#define UART_ADVFEATURE_OVERRUN_ENABLE
Definition: stm32f3xx_hal_uart.h:569

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: stm32f3xx_hal_uart.h:409
#define UART_OVERSAMPLING_8
Definition: stm32f3xx_hal_uart.h:410

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: stm32f3xx_hal_uart.h:370
#define UART_PARITY_ODD
Definition: stm32f3xx_hal_uart.h:371
#define UART_PARITY_NONE
Definition: stm32f3xx_hal_uart.h:369

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_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: stm32f3xx_hal_uart.h:442
#define UART_RECEIVER_TIMEOUT_ENABLE
Definition: stm32f3xx_hal_uart.h:443

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: stm32f3xx_hal_uart.h:506
#define UART_AUTOBAUD_REQUEST
Definition: stm32f3xx_hal_uart.h:505
#define UART_MUTE_MODE_REQUEST
Definition: stm32f3xx_hal_uart.h:507
#define UART_RXDATA_FLUSH_REQUEST
Definition: stm32f3xx_hal_uart.h:508
#define UART_TXDATA_FLUSH_REQUEST
Definition: stm32f3xx_hal_uart.h:509

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: stm32f3xx_hal_uart.h:401
#define UART_STATE_DISABLE
Definition: stm32f3xx_hal_uart.h:400

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: stm32f3xx_hal_uart.h:358
#define UART_STOPBITS_1
Definition: stm32f3xx_hal_uart.h:359
#define UART_STOPBITS_2
Definition: stm32f3xx_hal_uart.h:361
#define UART_STOPBITS_1_5
Definition: stm32f3xx_hal_uart.h:360

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: stm32f3xx_hal_uart.h:635
#define UART_WAKEUP_ON_ADDRESS
Definition: stm32f3xx_hal_uart.h:633
#define UART_WAKEUP_ON_STARTBIT
Definition: stm32f3xx_hal_uart.h:634

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: stm32f3xx_hal_uart.h:496
#define UART_WAKEUPMETHOD_ADDRESSMARK
Definition: stm32f3xx_hal_uart.h:497

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_SAMPLING16

#define UART_DIV_SAMPLING16 (   __PCLK__,
  __BAUD__ 
)    (((__PCLK__) + ((__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.
Return values
Divisionresult

◆ UART_DIV_SAMPLING8

#define UART_DIV_SAMPLING8 (   __PCLK__,
  __BAUD__ 
)    ((((__PCLK__)*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.
Return values
Divisionresult