summaryrefslogtreecommitdiff
path: root/docs/drivers
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2025-01-26 23:46:46 +1100
committerGitHub <noreply@github.com>2025-01-26 13:46:46 +0100
commit291d154d7b13efb83f24c76df26277f32b9f0a58 (patch)
treed7d2e05a18bdfbdd83258c8a91a70f16e57792e9 /docs/drivers
parente4f736e68518a09a922caf4638fca10f2ee3f38c (diff)
Unify UART headers (#24855)
* Remove deprecated defines * Move default config to .c files * Unify UART headers * Clean up docs * Reorganise PAL mode defaults
Diffstat (limited to 'docs/drivers')
-rw-r--r--docs/drivers/uart.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/docs/drivers/uart.md b/docs/drivers/uart.md
index 7cc68727ee..b895266cab 100644
--- a/docs/drivers/uart.md
+++ b/docs/drivers/uart.md
@@ -45,17 +45,17 @@ To enable UART, modify your board's `mcuconf.h` to enable the peripheral you've
45 45
46Configuration-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. 46Configuration-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.
47 47
48| `config.h` override | Description | Default Value | 48|`config.h` Override|Description |Default|
49| --------------------------- | --------------------------------------------------------------- | ------------- | 49|-------------------|---------------------------------------------------------------|-------|
50| `#define UART_DRIVER` | USART peripheral to use - USART1 -> `SD1`, USART2 -> `SD2` etc. | `SD1` | 50|`UART_DRIVER` |USART peripheral to use - USART1 -> `SD1`, USART2 -> `SD2` etc.|`SD1` |
51| `#define UART_TX_PIN` | The pin to use for TX | `A9` | 51|`UART_TX_PIN` |The pin to use for TX |`A9` |
52| `#define UART_TX_PAL_MODE` | The alternate function mode for TX | `7` | 52|`UART_TX_PAL_MODE` |The alternate function mode for TX |`7` |
53| `#define UART_RX_PIN` | The pin to use for RX | `A10` | 53|`UART_RX_PIN` |The pin to use for RX |`A10` |
54| `#define UART_RX_PAL_MODE` | The alternate function mode for RX | `7` | 54|`UART_RX_PAL_MODE` |The alternate function mode for RX |`7` |
55| `#define UART_CTS_PIN` | The pin to use for CTS | `A11` | 55|`UART_CTS_PIN` |The pin to use for CTS |`A11` |
56| `#define UART_CTS_PAL_MODE` | The alternate function mode for CTS | `7` | 56|`UART_CTS_PAL_MODE`|The alternate function mode for CTS |`7` |
57| `#define UART_RTS_PIN` | The pin to use for RTS | `A12` | 57|`UART_RTS_PIN` |The pin to use for RTS |`A12` |
58| `#define UART_RTS_PAL_MODE` | The alternate function mode for RTS | `7` | 58|`UART_RTS_PAL_MODE`|The alternate function mode for RTS |`7` |
59 59
60## API {#api} 60## API {#api}
61 61
@@ -111,7 +111,7 @@ Receive multiple bytes.
111#### Arguments {#api-uart-receive-arguments} 111#### Arguments {#api-uart-receive-arguments}
112 112
113 - `uint8_t *data` 113 - `uint8_t *data`
114 A pointer to the buffer to read into. 114 A pointer to a buffer to read into.
115 - `uint16_t length` 115 - `uint16_t length`
116 The number of bytes to read. Take care not to overrun the length of `data`. 116 The number of bytes to read. Take care not to overrun the length of `data`.
117 117
@@ -123,4 +123,4 @@ Return whether the receive buffer contains data. Call this function to determine
123 123
124#### Return Value {#api-uart-available-return} 124#### Return Value {#api-uart-available-return}
125 125
126`true` if the receive buffer length is non-zero. 126`true` if there is data available to read.