diff options
| author | Ryan <fauxpark@gmail.com> | 2025-01-26 23:46:46 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-26 13:46:46 +0100 |
| commit | 291d154d7b13efb83f24c76df26277f32b9f0a58 (patch) | |
| tree | d7d2e05a18bdfbdd83258c8a91a70f16e57792e9 /docs | |
| parent | e4f736e68518a09a922caf4638fca10f2ee3f38c (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')
| -rw-r--r-- | docs/drivers/uart.md | 26 |
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 | ||
| 46 | 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. | 46 | 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. |
| 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. |
