RTEMS 6.1-rc1
|
Macros | |
#define | USART_GET_DIV_FACTOR(__CLOCKPRESCALER__) |
Get USART clock division factor from clock prescaler value. More... | |
#define | USART_DIV_SAMPLING8(__PCLK__, __BAUD__, __CLOCKPRESCALER__) |
BRR division operation to set BRR register in 8-bit oversampling mode. More... | |
#define | USART_GETCLOCKSOURCE(__HANDLE__, __CLOCKSOURCE__) |
Report the USART clock source. More... | |
#define | IS_USART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) <= 12500000U) |
Check USART Baud rate. More... | |
#define | IS_USART_STOPBITS(__STOPBITS__) |
Ensure that USART frame number of stop bits is valid. More... | |
#define | IS_USART_PARITY(__PARITY__) |
Ensure that USART frame parity is valid. More... | |
#define | IS_USART_MODE(__MODE__) ((((__MODE__) & 0xFFFFFFF3U) == 0x00U) && ((__MODE__) != 0x00U)) |
Ensure that USART communication mode is valid. More... | |
#define | IS_USART_CLOCK(__CLOCK__) |
Ensure that USART clock state is valid. More... | |
#define | IS_USART_POLARITY(__CPOL__) (((__CPOL__) == USART_POLARITY_LOW) || ((__CPOL__) == USART_POLARITY_HIGH)) |
Ensure that USART frame polarity is valid. More... | |
#define | IS_USART_PHASE(__CPHA__) (((__CPHA__) == USART_PHASE_1EDGE) || ((__CPHA__) == USART_PHASE_2EDGE)) |
Ensure that USART frame phase is valid. More... | |
#define | IS_USART_LASTBIT(__LASTBIT__) |
Ensure that USART frame last bit clock pulse setting is valid. More... | |
#define | IS_USART_REQUEST_PARAMETER(__PARAM__) |
Ensure that USART request parameter is valid. More... | |
#define | IS_USART_PRESCALER(__CLOCKPRESCALER__) |
Ensure that USART Prescaler is valid. More... | |
#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) |
#define IS_USART_CLOCK | ( | __CLOCK__ | ) |
Ensure that USART clock state is valid.
__CLOCK__ | USART clock state. |
SET | (CLOCK is valid) or RESET (CLOCK is invalid) |
#define IS_USART_LASTBIT | ( | __LASTBIT__ | ) |
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) |
#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) |
#define IS_USART_PARITY | ( | __PARITY__ | ) |
Ensure that USART frame parity is valid.
__PARITY__ | USART frame parity. |
SET | (PARITY is valid) or RESET (PARITY is invalid) |
#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) |
#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) |
#define IS_USART_PRESCALER | ( | __CLOCKPRESCALER__ | ) |
Ensure that USART Prescaler is valid.
__CLOCKPRESCALER__ | USART Prescaler value. |
SET | (CLOCKPRESCALER is valid) or RESET (CLOCKPRESCALER is invalid) |
#define IS_USART_REQUEST_PARAMETER | ( | __PARAM__ | ) |
Ensure that USART request parameter is valid.
__PARAM__ | USART request parameter. |
SET | (PARAM is valid) or RESET (PARAM is invalid) |
#define IS_USART_STOPBITS | ( | __STOPBITS__ | ) |
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) |
#define USART_DIV_SAMPLING8 | ( | __PCLK__, | |
__BAUD__, | |||
__CLOCKPRESCALER__ | |||
) |
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 |
#define USART_GET_DIV_FACTOR | ( | __CLOCKPRESCALER__ | ) |
Get USART clock division factor from clock prescaler value.
__CLOCKPRESCALER__ | USART prescaler value. |
USART | clock division factor |
#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. |