|
GPS Device
|
Configuration enumerations and structures for the USART driver. More...

Classes | |
| struct | USART_CFG_ts |
| Configuration structure for initializing a USART peripheral. More... | |
Macros | |
| #define | USART_NAME_LEN 6 |
| Length of the null-terminated USART peripheral name string (e.g. "USART1"). | |
Enumerations | |
| enum | USART_MODE_te { USART_MODE_ASYNC , USART_MODE_SYNC } |
| USART operating mode. More... | |
| enum | USART_BAUD_RATE_te { USART_BAUD_RATE_1200 = 1200 , USART_BAUD_RATE_2400 = 2400 , USART_BAUD_RATE_9600 = 9600 , USART_BAUD_RATE_19200 = 19200 , USART_BAUD_RATE_38400 = 38400 , USART_BAUD_RATE_57600 = 57600 , USART_BAUD_RATE_115200 = 115200 , USART_BAUD_RATE_230400 = 230400 , USART_BAUD_RATE_460800 = 460800 , USART_BAUD_RATE_921600 = 921600 , USART_BAUD_RATE_2000000 = 2000000 , USART_BAUD_RATE_3000000 = 3000000 } |
| USART baud rate in bits per second. More... | |
| enum | USART_PARITY_te { USART_PARITY_DISABLED , USART_PARITY_EVEN , USART_PARITY_ODD } |
| USART parity bit configuration. More... | |
| enum | USART_FRAME_DATA_BITS_te { USART_FRAME_DATA_BITS_8 , USART_FRAME_DATA_BITS_9 } |
| USART data word length. More... | |
| enum | USART_OVERSAMPLING_te { USART_OVERSAMPLING_16 , USART_OVERSAMPLING_8 } |
| USART oversampling ratio. More... | |
| enum | USART_FRAME_STOP_BITS_te { USART_FRAME_STOP_BITS_1 , USART_FRAME_STOP_BITS_0_5 , USART_FRAME_STOP_BITS_2 , USART_FRAME_STOP_BITS_1_5 } |
| USART number of stop bits. More... | |
| enum | USART_HW_FLOW_CONTROL_te { USART_HW_FLOW_CONTROL_DISABLED , USART_HW_FLOW_CONTROL_ENABLED } |
| USART hardware flow control (RTS/CTS). More... | |
| enum | USART_SAMPLE_BIT_te { USART_SAMPLE_BIT_3 , USART_SAMPLE_BIT_1 } |
| USART receiver sample bit method. More... | |
| enum | USART_INTERRUPT_EN_te { USART_INTERRUPT_EN_FALSE , USART_INTERRUPT_EN_TRUE } |
| USART RXNE interrupt enable configuration. More... | |
Configuration enumerations and structures for the USART driver.
| #define USART_NAME_LEN 6 |
Length of the null-terminated USART peripheral name string (e.g. "USART1").
Definition at line 53 of file stm32f401re_usart.h.
| enum USART_MODE_te |
USART operating mode.
| Enumerator | |
|---|---|
| USART_MODE_ASYNC | Asynchronous mode (standard UART). |
| USART_MODE_SYNC | Synchronous mode (not yet implemented). |
Definition at line 60 of file stm32f401re_usart.h.
| enum USART_BAUD_RATE_te |
USART baud rate in bits per second.
The BRR register value is computed automatically from the peripheral clock during usart_init. USART1 and USART6 use APB2; USART2 uses APB1.
Definition at line 72 of file stm32f401re_usart.h.
| enum USART_PARITY_te |
USART parity bit configuration.
| Enumerator | |
|---|---|
| USART_PARITY_DISABLED | No parity bit. |
| USART_PARITY_EVEN | Even parity. |
| USART_PARITY_ODD | Odd parity. |
Definition at line 90 of file stm32f401re_usart.h.
USART data word length.
| Enumerator | |
|---|---|
| USART_FRAME_DATA_BITS_8 | 8-bit data word (standard). |
| USART_FRAME_DATA_BITS_9 | 9-bit data word. |
Definition at line 99 of file stm32f401re_usart.h.
USART oversampling ratio.
Oversampling by 16 provides better noise immunity; oversampling by 8 allows higher baud rates at a given peripheral clock frequency.
| Enumerator | |
|---|---|
| USART_OVERSAMPLING_16 | Oversample by 16 (OVER8 = 0). Better noise immunity. |
| USART_OVERSAMPLING_8 | Oversample by 8 (OVER8 = 1). Allows higher baud rates. |
Definition at line 111 of file stm32f401re_usart.h.
USART number of stop bits.
Definition at line 119 of file stm32f401re_usart.h.
USART hardware flow control (RTS/CTS).
| Enumerator | |
|---|---|
| USART_HW_FLOW_CONTROL_DISABLED | No hardware flow control. |
| USART_HW_FLOW_CONTROL_ENABLED | RTS and CTS hardware flow control enabled. |
Definition at line 129 of file stm32f401re_usart.h.
| enum USART_SAMPLE_BIT_te |
USART receiver sample bit method.
| Enumerator | |
|---|---|
| USART_SAMPLE_BIT_3 | Three-sample bit method (majority vote, better noise immunity). |
| USART_SAMPLE_BIT_1 | One-sample bit method (faster, less noise tolerant). |
Definition at line 137 of file stm32f401re_usart.h.
USART RXNE interrupt enable configuration.
| Enumerator | |
|---|---|
| USART_INTERRUPT_EN_FALSE | RXNE interrupt disabled; use polling via usart_receive. |
| USART_INTERRUPT_EN_TRUE | RXNE interrupt enabled; received bytes delivered via callback. |
Definition at line 145 of file stm32f401re_usart.h.