From 336224633ac3961026a55723c18279f6e5f18583 Mon Sep 17 00:00:00 2001 From: Ian Martin Date: Sat, 22 Mar 2014 10:26:03 -0400 Subject: [PATCH] Eliminate UART_CONF_IBRD and UART_CONF_FBRD. --- cpu/cc2538/dev/uart.c | 10 ---------- platform/cc2538dk/README.md | 8 -------- 2 files changed, 18 deletions(-) diff --git a/cpu/cc2538/dev/uart.c b/cpu/cc2538/dev/uart.c index 46b6c648a..1ab2f81f1 100644 --- a/cpu/cc2538/dev/uart.c +++ b/cpu/cc2538/dev/uart.c @@ -168,17 +168,7 @@ uart_init(void) REG(UART_BASE | UART_CTL) = UART_CTL_VALUE; /* Baud Rate Generation */ -#if (defined UART_CONF_BAUD_RATE) uart_set_baudrate(UART_CONF_BAUD_RATE); -#elif (defined UART_CONF_IBRD && defined UART_CONF_FBRD) - REG(UART_BASE | UART_IBRD) = UART_CONF_IBRD; - REG(UART_BASE | UART_FBRD) = UART_CONF_FBRD; -#else - #error "UART baud rate misconfigured and custom IBRD/FBRD values not provided" - #error "Check the value of UART_CONF_BAUD_RATE in contiki-conf.h or project-conf.h" - #error "Alternatively, you can provide custom values for " - #error "UART_CONF_IBRD and UART_CONF_FBRD" -#endif /* UART Control: 8N1 with FIFOs */ REG(UART_BASE | UART_LCRH) = UART_LCRH_WLEN_8 | UART_LCRH_FEN; diff --git a/platform/cc2538dk/README.md b/platform/cc2538dk/README.md index 04941fddd..0a04d6b9a 100644 --- a/platform/cc2538dk/README.md +++ b/platform/cc2538dk/README.md @@ -367,14 +367,6 @@ By default, the CC2538 UART is configured with a baud rate of 115200. It is easy #define UART_CONF_BAUD_RATE 230400 -Currently, this configuration directive only supports values 115200, 230400 and 460800. Custom baud rates can also be achieved by following the steps below: - -* Configure `UART_CONF_BAUD_RATE` with an unsupported value to prevent it from auto-choosing values for IBRD and FBRD. For instance, in your project-conf.h you can do: - - #define UART_CONF_BAUD_RATE 0 - -* Provide custom values for `UART_CONF_IBRD` and `UART_CONF_FBRD` according to the guidelines in the CC2538 User Guide. - RF and USB DMA -------------- Transfers between RAM and the RF and USB will be conducted with DMA. If for whatever reason you wish to disable this, here are the relevant configuration lines.