STM32H735xx HAL User Manual
|
Defines | |
#define | USART_GET_DIV_FACTOR(__CLOCKPRESCALER__) |
Get USART clock division factor from clock prescaler value. | |
#define | USART_DIV_SAMPLING8(__PCLK__, __BAUD__, __CLOCKPRESCALER__) |
BRR division operation to set BRR register in 8-bit oversampling mode. | |
#define | USART_GETCLOCKSOURCE(__HANDLE__, __CLOCKSOURCE__) |
Report the USART clock source. | |
#define | IS_USART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) <= 12500000U) |
Check USART Baud rate. | |
#define | IS_USART_STOPBITS(__STOPBITS__) |
Ensure that USART frame number of stop bits is valid. | |
#define | IS_USART_PARITY(__PARITY__) |
Ensure that USART frame parity is valid. | |
#define | IS_USART_MODE(__MODE__) ((((__MODE__) & 0xFFFFFFF3U) == 0x00U) && ((__MODE__) != 0x00U)) |
Ensure that USART communication mode is valid. | |
#define | IS_USART_CLOCK(__CLOCK__) |
Ensure that USART clock state is valid. | |
#define | IS_USART_POLARITY(__CPOL__) (((__CPOL__) == USART_POLARITY_LOW) || ((__CPOL__) == USART_POLARITY_HIGH)) |
Ensure that USART frame polarity is valid. | |
#define | IS_USART_PHASE(__CPHA__) (((__CPHA__) == USART_PHASE_1EDGE) || ((__CPHA__) == USART_PHASE_2EDGE)) |
Ensure that USART frame phase is valid. | |
#define | IS_USART_LASTBIT(__LASTBIT__) |
Ensure that USART frame last bit clock pulse setting is valid. | |
#define | IS_USART_REQUEST_PARAMETER(__PARAM__) |
Ensure that USART request parameter is valid. | |
#define | IS_USART_PRESCALER(__CLOCKPRESCALER__) |
Ensure that USART Prescaler is valid. |
#define IS_USART_BAUDRATE | ( | __BAUDRATE__ | ) | ((__BAUDRATE__) <= 12500000U) |
Check USART Baud rate.
__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) |
SET | (__BAUDRATE__ is valid) or RESET (__BAUDRATE__ is invalid) |
Definition at line 993 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().
#define IS_USART_CLOCK | ( | __CLOCK__ | ) |
(((__CLOCK__) == USART_CLOCK_DISABLE) || \ ((__CLOCK__) == USART_CLOCK_ENABLE))
Ensure that USART clock state is valid.
__CLOCK__ | USART clock state. |
SET | (__CLOCK__ is valid) or RESET (__CLOCK__ is invalid) |
Definition at line 1026 of file stm32h7xx_hal_usart.h.
#define IS_USART_LASTBIT | ( | __LASTBIT__ | ) |
(((__LASTBIT__) == USART_LASTBIT_DISABLE) || \ ((__LASTBIT__) == USART_LASTBIT_ENABLE))
Ensure that USART frame last bit clock pulse setting is valid.
__LASTBIT__ | USART frame last bit clock pulse setting. |
SET | (__LASTBIT__ is valid) or RESET (__LASTBIT__ is invalid) |
Definition at line 1048 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().
#define IS_USART_MODE | ( | __MODE__ | ) | ((((__MODE__) & 0xFFFFFFF3U) == 0x00U) && ((__MODE__) != 0x00U)) |
Ensure that USART communication mode is valid.
__MODE__ | USART communication mode. |
SET | (__MODE__ is valid) or RESET (__MODE__ is invalid) |
Definition at line 1019 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().
#define IS_USART_PARITY | ( | __PARITY__ | ) |
(((__PARITY__) == USART_PARITY_NONE) || \ ((__PARITY__) == USART_PARITY_EVEN) || \ ((__PARITY__) == USART_PARITY_ODD))
Ensure that USART frame parity is valid.
__PARITY__ | USART frame parity. |
SET | (__PARITY__ is valid) or RESET (__PARITY__ is invalid) |
Definition at line 1010 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().
#define IS_USART_PHASE | ( | __CPHA__ | ) | (((__CPHA__) == USART_PHASE_1EDGE) || ((__CPHA__) == USART_PHASE_2EDGE)) |
Ensure that USART frame phase is valid.
__CPHA__ | USART frame phase. |
SET | (__CPHA__ is valid) or RESET (__CPHA__ is invalid) |
Definition at line 1041 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().
#define IS_USART_POLARITY | ( | __CPOL__ | ) | (((__CPOL__) == USART_POLARITY_LOW) || ((__CPOL__) == USART_POLARITY_HIGH)) |
Ensure that USART frame polarity is valid.
__CPOL__ | USART frame polarity. |
SET | (__CPOL__ is valid) or RESET (__CPOL__ is invalid) |
Definition at line 1034 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().
#define IS_USART_PRESCALER | ( | __CLOCKPRESCALER__ | ) |
(((__CLOCKPRESCALER__) == USART_PRESCALER_DIV1) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV2) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV4) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV6) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV8) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV10) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV12) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV16) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV32) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV64) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV128) || \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV256))
Ensure that USART Prescaler is valid.
__CLOCKPRESCALER__ | USART Prescaler value. |
SET | (__CLOCKPRESCALER__ is valid) or RESET (__CLOCKPRESCALER__ is invalid) |
Definition at line 1064 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().
#define IS_USART_REQUEST_PARAMETER | ( | __PARAM__ | ) |
(((__PARAM__) == USART_RXDATA_FLUSH_REQUEST) || \ ((__PARAM__) == USART_TXDATA_FLUSH_REQUEST))
Ensure that USART request parameter is valid.
__PARAM__ | USART request parameter. |
SET | (__PARAM__ is valid) or RESET (__PARAM__ is invalid) |
Definition at line 1056 of file stm32h7xx_hal_usart.h.
#define IS_USART_STOPBITS | ( | __STOPBITS__ | ) |
(((__STOPBITS__) == USART_STOPBITS_0_5) || \ ((__STOPBITS__) == USART_STOPBITS_1) || \ ((__STOPBITS__) == USART_STOPBITS_1_5) || \ ((__STOPBITS__) == USART_STOPBITS_2))
Ensure that USART frame number of stop bits is valid.
__STOPBITS__ | USART frame number of stop bits. |
SET | (__STOPBITS__ is valid) or RESET (__STOPBITS__ is invalid) |
Definition at line 1000 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().
#define USART_DIV_SAMPLING8 | ( | __PCLK__, | |
__BAUD__, | |||
__CLOCKPRESCALER__ | |||
) |
(((((__PCLK__)/USART_GET_DIV_FACTOR(__CLOCKPRESCALER__))*2U)\ + ((__BAUD__)/2U)) / (__BAUD__))
BRR division operation to set BRR register in 8-bit oversampling mode.
__PCLK__ | USART clock. |
__BAUD__ | Baud rate set by the user. |
__CLOCKPRESCALER__ | USART prescaler value. |
Division | result |
Definition at line 718 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().
#define USART_GET_DIV_FACTOR | ( | __CLOCKPRESCALER__ | ) |
(((__CLOCKPRESCALER__) == USART_PRESCALER_DIV1) ? 1U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV2) ? 2U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV4) ? 4U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV6) ? 6U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV8) ? 8U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV10) ? 10U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV12) ? 12U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV16) ? 16U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV32) ? 32U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV64) ? 64U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV128) ? 128U : \ ((__CLOCKPRESCALER__) == USART_PRESCALER_DIV256) ? 256U : 1U)
Get USART clock division factor from clock prescaler value.
__CLOCKPRESCALER__ | USART prescaler value. |
USART | clock division factor |
Definition at line 698 of file stm32h7xx_hal_usart.h.
#define USART_GETCLOCKSOURCE | ( | __HANDLE__, | |
__CLOCKSOURCE__ | |||
) |
Report the USART clock source.
__HANDLE__ | specifies the USART Handle. |
__CLOCKSOURCE__ | output variable. |
the | USART clocking source, written in __CLOCKSOURCE__. |
Definition at line 728 of file stm32h7xx_hal_usart.h.
Referenced by USART_SetConfig().