aboutsummaryrefslogtreecommitdiff
path: root/docs/uart_driver.md
diff options
context:
space:
mode:
authorStefan Kerkmann <[email protected]>2024-02-20 11:34:24 +0100
committerGitHub <[email protected]>2024-02-20 11:34:24 +0100
commit61fa6949fbb537f54d48a4fc0218ff2b6873e940 (patch)
tree400f8f4920888097c0e22c68cb5fa742b0e340c8 /docs/uart_driver.md
parent865a8f42a6128dfc09a24fe749b0d78d8c69b70e (diff)
downloadqmk_firmware-61fa6949fbb537f54d48a4fc0218ff2b6873e940.tar.gz
qmk_firmware-61fa6949fbb537f54d48a4fc0218ff2b6873e940.zip
[Core] Allow ChibiOS `SIO` driver for `UART` driver (#22839)
* onekey: stm32f3_disco: add usart pins and activate peripheral Signed-off-by: Stefan Kerkmann <[email protected]> * chibios: uart: change SD1 prefix to UART Signed-off-by: Stefan Kerkmann <[email protected]> * chibios: uart: add SIO driver and RP2040 compatibility Signed-off-by: Stefan Kerkmann <[email protected]> Co-authored-by: Sergey Vlasov <[email protected]> * Update platforms/chibios/drivers/uart.h Co-authored-by: Joel Challis <[email protected]> --------- Signed-off-by: Stefan Kerkmann <[email protected]> Co-authored-by: Sergey Vlasov <[email protected]> Co-authored-by: Joel Challis <[email protected]>
Diffstat (limited to 'docs/uart_driver.md')
-rw-r--r--docs/uart_driver.md30
1 files changed, 12 insertions, 18 deletions
diff --git a/docs/uart_driver.md b/docs/uart_driver.md
index a88278d543..9b0a92d23d 100644
--- a/docs/uart_driver.md
+++ b/docs/uart_driver.md
@@ -32,13 +32,7 @@ No special setup is required - just connect the `RX` and `TX` pins of your UART
You'll need to determine which pins can be used for UART -- as an example, STM32 parts generally have multiple UART peripherals, labeled USART1, USART2, USART3 etc.
-To enable UART, modify your board's `halconf.h` to enable the serial driver:
-
-```c
-#define HAL_USE_SERIAL TRUE
-```
-
-Then, modify your board's `mcuconf.h` to enable the peripheral you've chosen, for example:
+To enable UART, modify your board's `mcuconf.h` to enable the peripheral you've chosen, for example:
```c
#undef STM32_SERIAL_USE_USART2
@@ -47,17 +41,17 @@ Then, modify your board's `mcuconf.h` to enable the peripheral you've chosen, fo
Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.
-|`config.h` override |Description |Default Value|
-|--------------------------|---------------------------------------------------------------|-------------|
-|`#define SERIAL_DRIVER` |USART peripheral to use - USART1 -> `SD1`, USART2 -> `SD2` etc.|`SD1` |
-|`#define SD1_TX_PIN` |The pin to use for TX |`A9` |
-|`#define SD1_TX_PAL_MODE` |The alternate function mode for TX |`7` |
-|`#define SD1_RX_PIN` |The pin to use for RX |`A10` |
-|`#define SD1_RX_PAL_MODE` |The alternate function mode for RX |`7` |
-|`#define SD1_CTS_PIN` |The pin to use for CTS |`A11` |
-|`#define SD1_CTS_PAL_MODE`|The alternate function mode for CTS |`7` |
-|`#define SD1_RTS_PIN` |The pin to use for RTS |`A12` |
-|`#define SD1_RTS_PAL_MODE`|The alternate function mode for RTS |`7` |
+| `config.h` override | Description | Default Value |
+| --------------------------- | --------------------------------------------------------------- | ------------- |
+| `#define UART_DRIVER` | USART peripheral to use - USART1 -> `SD1`, USART2 -> `SD2` etc. | `SD1` |
+| `#define UART_TX_PIN` | The pin to use for TX | `A9` |
+| `#define UART_TX_PAL_MODE` | The alternate function mode for TX | `7` |
+| `#define UART_RX_PIN` | The pin to use for RX | `A10` |
+| `#define UART_RX_PAL_MODE` | The alternate function mode for RX | `7` |
+| `#define UART_CTS_PIN` | The pin to use for CTS | `A11` |
+| `#define UART_CTS_PAL_MODE` | The alternate function mode for CTS | `7` |
+| `#define UART_RTS_PIN` | The pin to use for RTS | `A12` |
+| `#define UART_RTS_PAL_MODE` | The alternate function mode for RTS | `7` |
## API :id=api