From 33f49183d9427f3278010097d2275282c15cbb1c Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Wed, 30 Sep 2020 13:42:59 +0200 Subject: [PATCH] cpu/nrf5x_common: UART: add support for 1 MBaud `UART_BAUDRATE_BAUDRATE_Baud1M` is defined in the vendor files, so make it available to the user. --- cpu/nrf5x_common/periph/uart.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpu/nrf5x_common/periph/uart.c b/cpu/nrf5x_common/periph/uart.c index d5ac4532be..878c49154b 100644 --- a/cpu/nrf5x_common/periph/uart.c +++ b/cpu/nrf5x_common/periph/uart.c @@ -194,6 +194,9 @@ int uart_init(uart_t uart, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg) case 921600: REG_BAUDRATE = UART_BAUDRATE_BAUDRATE_Baud921600; break; + case 1000000: + REG_BAUDRATE = UART_BAUDRATE_BAUDRATE_Baud1M; + break; default: return UART_NOBAUD; }