RTEMS 6.1-rc5
|
Macros | |
#define | UART_GET_DIV_FACTOR(__CLOCKPRESCALER__) |
Get UART clok 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__) (((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)])*2U) + ((__BAUD__)/2U)) / (__BAUD__)) |
BRR division operation to set BRR register in 8-bit oversampling mode. | |
#define | UART_DIV_SAMPLING16(__PCLK__, __BAUD__, __CLOCKPRESCALER__) ((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)]) + ((__BAUD__)/2U)) / (__BAUD__)) |
BRR division operation to set BRR register in 16-bit oversampling mode. | |
#define | UART_INSTANCE_LOWPOWER(__HANDLE__) (IS_LPUART_INSTANCE((__HANDLE__)->Instance)) |
Check whether or not UART instance is Low Power UART. | |
#define | IS_UART_BAUDRATE(__BAUDRATE__) ((__BAUDRATE__) < 12500001U) |
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_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__) ((((__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. | |
#define | IS_UART_PRESCALER(__CLOCKPRESCALER__) |
Ensure that UART Prescaler is valid. | |
#define IS_LPUART_STOPBITS | ( | __STOPBITS__ | ) |
Ensure that LPUART frame number of stop bits is valid.
__STOPBITS__ | LPUART frame number of stop bits. |
SET | (STOPBITS is valid) or RESET (STOPBITS is invalid) |
#define IS_UART_ADVFEATURE_AUTOBAUDRATE | ( | __AUTOBAUDRATE__ | ) |
Ensure that UART auto Baud rate state is valid.
__AUTOBAUDRATE__ | UART auto Baud rate state. |
SET | (AUTOBAUDRATE is valid) or RESET (AUTOBAUDRATE is invalid) |
#define IS_UART_ADVFEATURE_AUTOBAUDRATEMODE | ( | __MODE__ | ) |
Ensure that UART auto Baud rate detection mode is valid.
__MODE__ | UART auto Baud rate detection mode. |
SET | (MODE is valid) or RESET (MODE is invalid) |
#define IS_UART_ADVFEATURE_DATAINV | ( | __DATAINV__ | ) |
Ensure that UART frame data inversion setting is valid.
__DATAINV__ | UART frame data inversion setting. |
SET | (DATAINV is valid) or RESET (DATAINV is invalid) |
#define IS_UART_ADVFEATURE_DMAONRXERROR | ( | __DMA__ | ) |
Ensure that UART DMA enabling or disabling on error setting is valid.
__DMA__ | UART DMA enabling or disabling on error setting. |
SET | (DMA is valid) or RESET (DMA is invalid) |
#define IS_UART_ADVFEATURE_INIT | ( | __INIT__ | ) |
Ensure that UART advanced features initialization is valid.
__INIT__ | UART advanced features initialization. |
SET | (INIT is valid) or RESET (INIT is invalid) |
#define IS_UART_ADVFEATURE_MSBFIRST | ( | __MSBFIRST__ | ) |
Ensure that UART frame MSB first setting is valid.
__MSBFIRST__ | UART frame MSB first setting. |
SET | (MSBFIRST is valid) or RESET (MSBFIRST is invalid) |
#define IS_UART_ADVFEATURE_RXINV | ( | __RXINV__ | ) |
Ensure that UART frame RX inversion setting is valid.
__RXINV__ | UART frame RX inversion setting. |
SET | (RXINV is valid) or RESET (RXINV is invalid) |
#define IS_UART_ADVFEATURE_STOPMODE | ( | __STOPMODE__ | ) |
Ensure that UART stop mode state is valid.
__STOPMODE__ | UART stop mode state. |
SET | (STOPMODE is valid) or RESET (STOPMODE is invalid) |
#define IS_UART_ADVFEATURE_SWAP | ( | __SWAP__ | ) |
Ensure that UART frame RX/TX pins swap setting is valid.
__SWAP__ | UART frame RX/TX pins swap setting. |
SET | (SWAP is valid) or RESET (SWAP is invalid) |
#define IS_UART_ADVFEATURE_TXINV | ( | __TXINV__ | ) |
Ensure that UART frame TX inversion setting is valid.
__TXINV__ | UART frame TX inversion setting. |
SET | (TXINV is valid) or RESET (TXINV is invalid) |
#define IS_UART_ASSERTIONTIME | ( | __TIME__ | ) | ((__TIME__) <= 0x1FU) |
Check UART assertion time.
__TIME__ | 5-bit value assertion time. |
Test | result (TRUE or FALSE). |
#define IS_UART_BAUDRATE | ( | __BAUDRATE__ | ) | ((__BAUDRATE__) < 12500001U) |
Check UART 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_UART_DE_POLARITY | ( | __POLARITY__ | ) |
Ensure that UART driver enable polarity is valid.
__POLARITY__ | UART driver enable polarity. |
SET | (POLARITY is valid) or RESET (POLARITY is invalid) |
#define IS_UART_DEASSERTIONTIME | ( | __TIME__ | ) | ((__TIME__) <= 0x1FU) |
Check UART deassertion time.
__TIME__ | 5-bit value deassertion time. |
Test | result (TRUE or FALSE). |
#define IS_UART_DMA_RX | ( | __DMARX__ | ) |
Ensure that UART DMA RX state is valid.
__DMARX__ | UART DMA RX state. |
SET | (DMARX is valid) or RESET (DMARX is invalid) |
#define IS_UART_DMA_TX | ( | __DMATX__ | ) |
Ensure that UART DMA TX state is valid.
__DMATX__ | UART DMA TX state. |
SET | (DMATX is valid) or RESET (DMATX is invalid) |
#define IS_UART_HALF_DUPLEX | ( | __HDSEL__ | ) |
Ensure that UART half-duplex state is valid.
__HDSEL__ | UART half-duplex state. |
SET | (HDSEL is valid) or RESET (HDSEL is invalid) |
#define IS_UART_HARDWARE_FLOW_CONTROL | ( | __CONTROL__ | ) |
Ensure that UART hardware flow control is valid.
__CONTROL__ | UART hardware flow control. |
SET | (CONTROL is valid) or RESET (CONTROL is invalid) |
#define IS_UART_LIN | ( | __LIN__ | ) |
Ensure that UART LIN state is valid.
__LIN__ | UART LIN state. |
SET | (LIN is valid) or RESET (LIN is invalid) |
#define IS_UART_LIN_BREAK_DETECT_LENGTH | ( | __LENGTH__ | ) |
Ensure that UART LIN break detection length is valid.
__LENGTH__ | UART LIN break detection length. |
SET | (LENGTH is valid) or RESET (LENGTH is invalid) |
#define IS_UART_MODE | ( | __MODE__ | ) | ((((__MODE__) & (~((uint32_t)(UART_MODE_TX_RX)))) == 0x00U) && ((__MODE__) != 0x00U)) |
Ensure that UART communication mode is valid.
__MODE__ | UART communication mode. |
SET | (MODE is valid) or RESET (MODE is invalid) |
#define IS_UART_MUTE_MODE | ( | __MUTE__ | ) |
Ensure that UART mute mode state is valid.
__MUTE__ | UART mute mode state. |
SET | (MUTE is valid) or RESET (MUTE is invalid) |
#define IS_UART_ONE_BIT_SAMPLE | ( | __ONEBIT__ | ) |
Ensure that UART frame sampling is valid.
__ONEBIT__ | UART frame sampling. |
SET | (ONEBIT is valid) or RESET (ONEBIT is invalid) |
#define IS_UART_OVERRUN | ( | __OVERRUN__ | ) |
Ensure that UART frame overrun setting is valid.
__OVERRUN__ | UART frame overrun setting. |
SET | (OVERRUN is valid) or RESET (OVERRUN is invalid) |
#define IS_UART_OVERSAMPLING | ( | __SAMPLING__ | ) |
Ensure that UART oversampling is valid.
__SAMPLING__ | UART oversampling. |
SET | (SAMPLING is valid) or RESET (SAMPLING is invalid) |
#define IS_UART_PARITY | ( | __PARITY__ | ) |
Ensure that UART frame parity is valid.
__PARITY__ | UART frame parity. |
SET | (PARITY is valid) or RESET (PARITY is invalid) |
#define IS_UART_PRESCALER | ( | __CLOCKPRESCALER__ | ) |
Ensure that UART Prescaler is valid.
__CLOCKPRESCALER__ | UART Prescaler value. |
SET | (CLOCKPRESCALER is valid) or RESET (CLOCKPRESCALER is invalid) |
#define IS_UART_RECEIVER_TIMEOUT | ( | __TIMEOUT__ | ) |
Ensure that UART receiver timeout setting is valid.
__TIMEOUT__ | UART receiver timeout setting. |
SET | (TIMEOUT is valid) or RESET (TIMEOUT is invalid) |
#define IS_UART_RECEIVER_TIMEOUT_VALUE | ( | __TIMEOUTVALUE__ | ) | ((__TIMEOUTVALUE__) <= 0xFFFFFFU) |
Check the receiver timeout value.
__TIMEOUTVALUE__ | receiver timeout value. |
Test | result (TRUE or FALSE) |
#define IS_UART_REQUEST_PARAMETER | ( | __PARAM__ | ) |
Ensure that UART request parameter is valid.
__PARAM__ | UART request parameter. |
SET | (PARAM is valid) or RESET (PARAM is invalid) |
#define IS_UART_STATE | ( | __STATE__ | ) |
Ensure that UART state is valid.
__STATE__ | UART state. |
SET | (STATE is valid) or RESET (STATE is invalid) |
#define IS_UART_STOPBITS | ( | __STOPBITS__ | ) |
Ensure that UART frame number of stop bits is valid.
__STOPBITS__ | UART frame number of stop bits. |
SET | (STOPBITS is valid) or RESET (STOPBITS is invalid) |
#define IS_UART_WAKEUP_SELECTION | ( | __WAKE__ | ) |
Ensure that UART wake-up selection is valid.
__WAKE__ | UART wake-up selection. |
SET | (WAKE is valid) or RESET (WAKE is invalid) |
#define IS_UART_WAKEUPMETHOD | ( | __WAKEUP__ | ) |
Ensure that UART wake-up method is valid.
__WAKEUP__ | UART wake-up method . |
SET | (WAKEUP is valid) or RESET (WAKEUP is invalid) |
#define UART_DIV_LPUART | ( | __PCLK__, | |
__BAUD__, | |||
__CLOCKPRESCALER__ | |||
) |
BRR division operation to set BRR register with LPUART.
__PCLK__ | LPUART clock. |
__BAUD__ | Baud rate set by the user. |
__CLOCKPRESCALER__ | UART prescaler value. |
Division | result |
#define UART_DIV_SAMPLING16 | ( | __PCLK__, | |
__BAUD__, | |||
__CLOCKPRESCALER__ | |||
) | ((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)]) + ((__BAUD__)/2U)) / (__BAUD__)) |
BRR division operation to set BRR register in 16-bit oversampling mode.
__PCLK__ | UART clock. |
__BAUD__ | Baud rate set by the user. |
__CLOCKPRESCALER__ | UART prescaler value. |
Division | result |
#define UART_DIV_SAMPLING8 | ( | __PCLK__, | |
__BAUD__, | |||
__CLOCKPRESCALER__ | |||
) | (((((__PCLK__)/UARTPrescTable[(__CLOCKPRESCALER__)])*2U) + ((__BAUD__)/2U)) / (__BAUD__)) |
BRR division operation to set BRR register in 8-bit oversampling mode.
__PCLK__ | UART clock. |
__BAUD__ | Baud rate set by the user. |
__CLOCKPRESCALER__ | UART prescaler value. |
Division | result |
#define UART_GET_DIV_FACTOR | ( | __CLOCKPRESCALER__ | ) |
Get UART clok division factor from clock prescaler value.
__CLOCKPRESCALER__ | UART prescaler value. |
UART | clock division factor |
#define UART_INSTANCE_LOWPOWER | ( | __HANDLE__ | ) | (IS_LPUART_INSTANCE((__HANDLE__)->Instance)) |
Check whether or not UART instance is Low Power UART.
__HANDLE__ | specifies the UART Handle. |
SET | (instance is LPUART) or RESET (instance isn't LPUART) |