STM32L443xx HAL User Manual
|
Defines | |
#define | USART_DIV_SAMPLING8(__PCLK__, __BAUD__) ((((__PCLK__)*2U) + ((__BAUD__)/2U)) / (__BAUD__)) |
BRR division operation to set BRR register in 8-bit oversampling mode. | |
#define | IS_USART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) <= 10000000U) |
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_BAUDRATE | ( | __BAUDRATE__ | ) | ((__BAUDRATE__) <= 10000000U) |
Check USART Baud rate.
__BAUDRATE__ | Baudrate specified by the user. The maximum Baud Rate is derived from the maximum clock on L4 divided by the smallest oversampling used on the USART (i.e. 8) (i.e. 120 MHz on STM32L4Rx/L4Sx, 80 Mhz otherwise) |
SET | (__BAUDRATE__ is valid) or RESET (__BAUDRATE__ is invalid) |
Definition at line 781 of file stm32l4xx_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 815 of file stm32l4xx_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 837 of file stm32l4xx_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 808 of file stm32l4xx_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 799 of file stm32l4xx_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 830 of file stm32l4xx_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 823 of file stm32l4xx_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 845 of file stm32l4xx_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 789 of file stm32l4xx_hal_usart.h.
Referenced by USART_SetConfig().
#define USART_DIV_SAMPLING8 | ( | __PCLK__, | |
__BAUD__ | |||
) | ((((__PCLK__)*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. |
Division | result |
Definition at line 768 of file stm32l4xx_hal_usart.h.
Referenced by USART_SetConfig().