 |
思澈科技軟件開發(fā)工具包
2.20
|
|
◆ IS_LPUART_STOPBITS
| #define IS_LPUART_STOPBITS |
( |
|
__STOPBITS__ | ) |
|
Value:
Ensure that LPUART frame number of stop bits is valid.
- Parameters
-
| __STOPBITS__ | LPUART frame number of stop bits. |
- Return values
-
| SET | (STOPBITS is valid) or RESET (STOPBITS is invalid) |
◆ IS_UART_ADVFEATURE_AUTOBAUDRATE
| #define IS_UART_ADVFEATURE_AUTOBAUDRATE |
( |
|
__AUTOBAUDRATE__ | ) |
|
Value:
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__ | ) |
(1) |
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:
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:
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:
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:
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:
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:
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:
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:
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
-
| Test | result (TRUE or FALSE). |
◆ IS_UART_BAUDRATE
| #define IS_UART_BAUDRATE |
( |
|
__BAUDRATE__ | ) |
((__BAUDRATE__) < 10000001U) |
Check UART Baud rate.
- Parameters
-
| __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) |
- Return values
-
| SET | (BAUDRATE is valid) or RESET (BAUDRATE is invalid) |
◆ IS_UART_DE_POLARITY
| #define IS_UART_DE_POLARITY |
( |
|
__POLARITY__ | ) |
|
Value:
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
-
| Test | result (TRUE or FALSE). |
◆ IS_UART_DMA_RX
| #define IS_UART_DMA_RX |
( |
|
__DMARX__ | ) |
|
Value:
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:
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:
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:
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:
Ensure that UART LIN state is valid.
- Parameters
-
- 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:
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:
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:
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:
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:
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:
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:
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_REQUEST_PARAMETER
| #define IS_UART_REQUEST_PARAMETER |
( |
|
__PARAM__ | ) |
|
Value:
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:
Ensure that UART state is valid.
- Parameters
-
- Return values
-
| SET | (STATE is valid) or RESET (STATE is invalid) |
◆ IS_UART_STOPBITS
| #define IS_UART_STOPBITS |
( |
|
__STOPBITS__ | ) |
|
Value:
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:
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:
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) |
◆ IS_UART_WORD_LENGTH
| #define IS_UART_WORD_LENGTH |
( |
|
LENGTH | ) |
|
◆ UART_DIV_LPUART
| #define UART_DIV_LPUART |
( |
|
__PCLK__, |
|
|
|
__BAUD__ |
|
) |
| (((((uint64_t)(__PCLK__)*256U)) + ((__BAUD__)/2U)) / (__BAUD__)) |
BRR division operation to set BRR register with LPUART.
- Parameters
-
| __PCLK__ | LPUART clock. |
| __BAUD__ | Baud rate set by the user. |
- Return values
-
◆ 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
-
◆ 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
-
◆ UART_INSTANCE_LOWPOWER
| #define UART_INSTANCE_LOWPOWER |
( |
|
__HANDLE__ | ) |
(IS_LPUART_INSTANCE((__HANDLE__)->Instance)) |
Check whether or not UART instance is Low Power UART.
- Parameters
-
| __HANDLE__ | specifies the UART Handle. |
- Return values
-
| SET | (instance is LPUART) or RESET (instance isn't LPUART) |
◆ UART_MASK_COMPUTATION
| #define UART_MASK_COMPUTATION |
( |
|
__HANDLE__ | ) |
|
Report the UART mask to apply to retrieve the received data according to the word length and to the parity bits activation.
- Note
- If PCE = 1, the parity bit is not included in the data extracted by the reception API(). This masking operation is not carried out in the case of DMA transfers.
- Parameters
-
| __HANDLE__ | specifies the UART Handle. |
- Return values
-
| None,the | mask to apply to UART RDR register is stored in (HANDLE)->Mask field. |
#define UART_OVERSAMPLING_16
Definition: bf0_hal_uart.h:434
#define UART_DMA_RX_ENABLE
Definition: bf0_hal_uart.h:522
#define UART_HWCONTROL_NONE
Definition: bf0_hal_uart.h:404
#define UART_RXDATA_FLUSH_REQUEST
Definition: bf0_hal_uart.h:551
#define UART_TXDATA_FLUSH_REQUEST
Definition: bf0_hal_uart.h:552
#define UART_WORDLENGTH_9B
Definition: bf0_hal_uart.h:371
#define UART_HALF_DUPLEX_ENABLE
Definition: bf0_hal_uart.h:531
#define UART_ADVFEATURE_SWAP_DISABLE
Definition: bf0_hal_uart.h:603
#define UART_ADVFEATURE_TXINV_DISABLE
Definition: bf0_hal_uart.h:576
#define UART_ADVFEATURE_NO_INIT
Definition: bf0_hal_uart.h:560
#define UART_HWCONTROL_CTS
Definition: bf0_hal_uart.h:406
#define UART_STATE_DISABLE
Definition: bf0_hal_uart.h:425
#define UART_STOPBITS_1_5
Definition: bf0_hal_uart.h:385
#define UART_WAKEUP_ON_STARTBIT
Definition: bf0_hal_uart.h:675
#define UART_ADVFEATURE_STOPMODE_ENABLE
Definition: bf0_hal_uart.h:649
#define UART_PARITY_NONE
Definition: bf0_hal_uart.h:394
#define UART_ADVFEATURE_MSBFIRST_DISABLE
Definition: bf0_hal_uart.h:639
#define UART_WORDLENGTH_7B
Definition: bf0_hal_uart.h:369
#define UART_ADVFEATURE_DMADISABLEONERROR_INIT
Definition: bf0_hal_uart.h:566
#define UART_MUTE_MODE_REQUEST
Definition: bf0_hal_uart.h:550
#define UART_ADVFEATURE_MSBFIRST_ENABLE
Definition: bf0_hal_uart.h:640
#define UART_LIN_DISABLE
Definition: bf0_hal_uart.h:494
#define UART_ADVFEATURE_TXINV_ENABLE
Definition: bf0_hal_uart.h:577
#define UART_RECEIVER_TIMEOUT_ENABLE
Definition: bf0_hal_uart.h:486
#define UART_AUTOBAUD_REQUEST
Definition: bf0_hal_uart.h:548
#define UART_DE_POLARITY_LOW
Definition: bf0_hal_uart.h:685
#define UART_HWCONTROL_RTS
Definition: bf0_hal_uart.h:405
#define UART_WAKEUPMETHOD_IDLELINE
Definition: bf0_hal_uart.h:539
#define UART_SENDBREAK_REQUEST
Definition: bf0_hal_uart.h:549
#define UART_WAKEUP_ON_READDATA_NONEMPTY
Definition: bf0_hal_uart.h:676
#define UART_ADVFEATURE_MSBFIRST_INIT
Definition: bf0_hal_uart.h:568
#define UART_ADVFEATURE_RXINVERT_INIT
Definition: bf0_hal_uart.h:562
#define UART_LIN_ENABLE
Definition: bf0_hal_uart.h:495
#define UART_ADVFEATURE_SWAP_INIT
Definition: bf0_hal_uart.h:564
#define UART_ADVFEATURE_RXOVERRUNDISABLE_INIT
Definition: bf0_hal_uart.h:565
#define UART_DMA_RX_DISABLE
Definition: bf0_hal_uart.h:521
#define UART_ADVFEATURE_SWAP_ENABLE
Definition: bf0_hal_uart.h:604
#define UART_DE_POLARITY_HIGH
Definition: bf0_hal_uart.h:684
#define UART_ADVFEATURE_OVERRUN_DISABLE
Definition: bf0_hal_uart.h:613
#define UART_ADVFEATURE_MUTEMODE_ENABLE
Definition: bf0_hal_uart.h:658
#define UART_ADVFEATURE_DATAINV_DISABLE
Definition: bf0_hal_uart.h:594
#define UART_ADVFEATURE_RXINV_DISABLE
Definition: bf0_hal_uart.h:585
#define UART_WORDLENGTH_6B
Definition: bf0_hal_uart.h:368
#define UART_RECEIVER_TIMEOUT_DISABLE
Definition: bf0_hal_uart.h:485
#define UART_HWCONTROL_RTS_CTS
Definition: bf0_hal_uart.h:407
#define UART_ADVFEATURE_AUTOBAUDRATE_DISABLE
Definition: bf0_hal_uart.h:621
#define UART_PARITY_EVEN
Definition: bf0_hal_uart.h:395
#define UART_ADVFEATURE_TXINVERT_INIT
Definition: bf0_hal_uart.h:561
#define UART_ONE_BIT_SAMPLE_ENABLE
Definition: bf0_hal_uart.h:444
#define UART_ADVFEATURE_STOPMODE_DISABLE
Definition: bf0_hal_uart.h:648
#define UART_ADVFEATURE_DATAINVERT_INIT
Definition: bf0_hal_uart.h:563
#define UART_DMA_TX_ENABLE
Definition: bf0_hal_uart.h:513
#define UART_ADVFEATURE_DATAINV_ENABLE
Definition: bf0_hal_uart.h:595
#define UART_ADVFEATURE_RXINV_ENABLE
Definition: bf0_hal_uart.h:586
#define UART_ADVFEATURE_AUTOBAUDRATE_INIT
Definition: bf0_hal_uart.h:567
#define UART_WAKEUP_ON_ADDRESS
Definition: bf0_hal_uart.h:674
#define UART_DMA_TX_DISABLE
Definition: bf0_hal_uart.h:512
#define UART_STOPBITS_0_5
Definition: bf0_hal_uart.h:383
#define UART_STOPBITS_1
Definition: bf0_hal_uart.h:384
#define UART_STOPBITS_2
Definition: bf0_hal_uart.h:386
#define UART_ADVFEATURE_AUTOBAUDRATE_ENABLE
Definition: bf0_hal_uart.h:622
#define UART_ADVFEATURE_DMA_DISABLEONRXERROR
Definition: bf0_hal_uart.h:631
#define UART_WORDLENGTH_8B
Definition: bf0_hal_uart.h:370
#define UART_PARITY_ODD
Definition: bf0_hal_uart.h:396
#define UART_OVERSAMPLING_8
Definition: bf0_hal_uart.h:435
#define UART_ONE_BIT_SAMPLE_DISABLE
Definition: bf0_hal_uart.h:443
#define UART_STATE_ENABLE
Definition: bf0_hal_uart.h:426
#define UART_ADVFEATURE_OVERRUN_ENABLE
Definition: bf0_hal_uart.h:612
#define UART_HALF_DUPLEX_DISABLE
Definition: bf0_hal_uart.h:530
#define UART_WAKEUPMETHOD_ADDRESSMARK
Definition: bf0_hal_uart.h:540
#define UART_LINBREAKDETECTLENGTH_10B
Definition: bf0_hal_uart.h:503
#define UART_ADVFEATURE_MUTEMODE_DISABLE
Definition: bf0_hal_uart.h:657
#define UART_ADVFEATURE_DMA_ENABLEONRXERROR
Definition: bf0_hal_uart.h:630
#define UART_LINBREAKDETECTLENGTH_11B
Definition: bf0_hal_uart.h:504