Eliminate UART_CONF_IBRD and UART_CONF_FBRD.
This commit is contained in:
parent
ee45fc7533
commit
336224633a
2 changed files with 0 additions and 18 deletions
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue