Contiki 3.x
uart.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012, Texas Instruments Incorporated - http://www.ti.com/
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  *
14  * 3. Neither the name of the copyright holder nor the names of its
15  * contributors may be used to endorse or promote products derived
16  * from this software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29  * OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 /**
32  * \addtogroup cc2538-uart
33  * @{
34  *
35  * \file
36  * Implementation of the cc2538 UART driver
37  */
38 #include "contiki.h"
39 #include "sys/energest.h"
40 #include "dev/sys-ctrl.h"
41 #include "dev/ioc.h"
42 #include "dev/gpio.h"
43 #include "dev/uart.h"
44 #include "lpm.h"
45 #include "reg.h"
46 
47 #include <stdbool.h>
48 #include <stdint.h>
49 #include <string.h>
50 
51 #ifndef UART0_RX_PORT
52 #define UART0_RX_PORT (-1)
53 #endif
54 #ifndef UART0_RX_PIN
55 #define UART0_RX_PIN (-1)
56 #endif
57 #if UART0_RX_PORT >= 0 && UART0_RX_PIN < 0 || \
58  UART0_RX_PORT < 0 && UART0_RX_PIN >= 0
59 #error Both UART0_RX_PORT and UART0_RX_PIN must be valid or invalid
60 #endif
61 
62 #ifndef UART0_TX_PORT
63 #define UART0_TX_PORT (-1)
64 #endif
65 #ifndef UART0_TX_PIN
66 #define UART0_TX_PIN (-1)
67 #endif
68 #if UART0_TX_PORT >= 0 && UART0_TX_PIN < 0 || \
69  UART0_TX_PORT < 0 && UART0_TX_PIN >= 0
70 #error Both UART0_TX_PORT and UART0_TX_PIN must be valid or invalid
71 #endif
72 
73 #if UART0_RX_PORT >= 0 && UART0_TX_PORT < 0 || \
74  UART0_RX_PORT < 0 && UART0_TX_PORT >= 0
75 #error Both UART0_RX and UART0_TX pads must be valid or invalid
76 #endif
77 
78 #if UART_IN_USE(0) && UART0_RX_PORT < 0
79 #error Contiki is configured to use UART0, but its pads are not valid
80 #endif
81 
82 #ifndef UART1_RX_PORT
83 #define UART1_RX_PORT (-1)
84 #endif
85 #ifndef UART1_RX_PIN
86 #define UART1_RX_PIN (-1)
87 #endif
88 #if UART1_RX_PORT >= 0 && UART1_RX_PIN < 0 || \
89  UART1_RX_PORT < 0 && UART1_RX_PIN >= 0
90 #error Both UART1_RX_PORT and UART1_RX_PIN must be valid or invalid
91 #endif
92 
93 #ifndef UART1_TX_PORT
94 #define UART1_TX_PORT (-1)
95 #endif
96 #ifndef UART1_TX_PIN
97 #define UART1_TX_PIN (-1)
98 #endif
99 #if UART1_TX_PORT >= 0 && UART1_TX_PIN < 0 || \
100  UART1_TX_PORT < 0 && UART1_TX_PIN >= 0
101 #error Both UART1_TX_PORT and UART1_TX_PIN must be valid or invalid
102 #endif
103 
104 #if UART1_RX_PORT >= 0 && UART1_TX_PORT < 0 || \
105  UART1_RX_PORT < 0 && UART1_TX_PORT >= 0
106 #error Both UART1_RX and UART1_TX pads must be valid or invalid
107 #endif
108 
109 #if UART_IN_USE(1) && UART1_RX_PORT < 0
110 #error Contiki is configured to use UART1, but its pads are not valid
111 #endif
112 
113 #ifndef UART1_CTS_PORT
114 #define UART1_CTS_PORT (-1)
115 #endif
116 #ifndef UART1_CTS_PIN
117 #define UART1_CTS_PIN (-1)
118 #endif
119 #if UART1_CTS_PORT >= 0 && UART1_CTS_PIN < 0 || \
120  UART1_CTS_PORT < 0 && UART1_CTS_PIN >= 0
121 #error Both UART1_CTS_PORT and UART1_CTS_PIN must be valid or invalid
122 #endif
123 
124 #ifndef UART1_RTS_PORT
125 #define UART1_RTS_PORT (-1)
126 #endif
127 #ifndef UART1_RTS_PIN
128 #define UART1_RTS_PIN (-1)
129 #endif
130 #if UART1_RTS_PORT >= 0 && UART1_RTS_PIN < 0 || \
131  UART1_RTS_PORT < 0 && UART1_RTS_PIN >= 0
132 #error Both UART1_RTS_PORT and UART1_RTS_PIN must be valid or invalid
133 #endif
134 /*---------------------------------------------------------------------------*/
135 /*
136  * Baud rate defines used in uart_init() to set the values of UART_IBRD and
137  * UART_FBRD in order to achieve the configured baud rates.
138  */
139 #define UART_CLOCK_RATE 16000000 /* 16 MHz */
140 #define UART_CTL_HSE_VALUE 0
141 #define UART_CTL_VALUE (UART_CTL_RXE | UART_CTL_TXE | (UART_CTL_HSE_VALUE << 5))
142 
143 /* DIV_ROUND() divides integers while avoiding a rounding error: */
144 #define DIV_ROUND(num, denom) (((num) + (denom) / 2) / (denom))
145 
146 #define BAUD2BRD(baud) DIV_ROUND(UART_CLOCK_RATE << (UART_CTL_HSE_VALUE + 2), (baud))
147 #define BAUD2IBRD(baud) (BAUD2BRD(baud) >> 6)
148 #define BAUD2FBRD(baud) (BAUD2BRD(baud) & 0x3f)
149 /*---------------------------------------------------------------------------*/
150 typedef struct {
151  int8_t port;
152  int8_t pin;
153 } uart_pad_t;
154 typedef struct {
155  uint32_t sys_ctrl_rcgcuart_uart;
156  uint32_t sys_ctrl_scgcuart_uart;
157  uint32_t sys_ctrl_dcgcuart_uart;
158  uint32_t base;
159  uint32_t ioc_uartrxd_uart;
160  uint32_t ioc_pxx_sel_uart_txd;
161  uint32_t ibrd;
162  uint32_t fbrd;
163  uart_pad_t rx;
164  uart_pad_t tx;
165  uart_pad_t cts;
166  uart_pad_t rts;
167  uint8_t nvic_int;
168 } uart_regs_t;
169 /*---------------------------------------------------------------------------*/
170 static const uart_regs_t uart_regs[UART_INSTANCE_COUNT] = {
171  {
172  .sys_ctrl_rcgcuart_uart = SYS_CTRL_RCGCUART_UART0,
173  .sys_ctrl_scgcuart_uart = SYS_CTRL_SCGCUART_UART0,
174  .sys_ctrl_dcgcuart_uart = SYS_CTRL_DCGCUART_UART0,
175  .base = UART_0_BASE,
176  .ioc_uartrxd_uart = IOC_UARTRXD_UART0,
177  .ioc_pxx_sel_uart_txd = IOC_PXX_SEL_UART0_TXD,
178  .ibrd = BAUD2IBRD(UART0_CONF_BAUD_RATE),
179  .fbrd = BAUD2FBRD(UART0_CONF_BAUD_RATE),
180  .rx = {UART0_RX_PORT, UART0_RX_PIN},
181  .tx = {UART0_TX_PORT, UART0_TX_PIN},
182  .cts = {-1, -1},
183  .rts = {-1, -1},
184  .nvic_int = NVIC_INT_UART0
185  }, {
186  .sys_ctrl_rcgcuart_uart = SYS_CTRL_RCGCUART_UART1,
187  .sys_ctrl_scgcuart_uart = SYS_CTRL_SCGCUART_UART1,
188  .sys_ctrl_dcgcuart_uart = SYS_CTRL_DCGCUART_UART1,
189  .base = UART_1_BASE,
190  .ioc_uartrxd_uart = IOC_UARTRXD_UART1,
191  .ioc_pxx_sel_uart_txd = IOC_PXX_SEL_UART1_TXD,
192  .ibrd = BAUD2IBRD(UART1_CONF_BAUD_RATE),
193  .fbrd = BAUD2FBRD(UART1_CONF_BAUD_RATE),
194  .rx = {UART1_RX_PORT, UART1_RX_PIN},
195  .tx = {UART1_TX_PORT, UART1_TX_PIN},
196  .cts = {UART1_CTS_PORT, UART1_CTS_PIN},
197  .rts = {UART1_RTS_PORT, UART1_RTS_PIN},
198  .nvic_int = NVIC_INT_UART1
199  }
200 };
201 static int (* input_handler[UART_INSTANCE_COUNT])(unsigned char c);
202 /*---------------------------------------------------------------------------*/
203 static void
204 reset(uint32_t uart_base)
205 {
206  uint32_t lchr;
207 
208  /* Make sure the UART is disabled before trying to configure it */
209  REG(uart_base | UART_CTL) = UART_CTL_VALUE;
210 
211  /* Clear error status */
212  REG(uart_base | UART_ECR) = 0xFF;
213 
214  /* Store LCHR configuration */
215  lchr = REG(uart_base | UART_LCRH);
216 
217  /* Flush FIFOs by clearing LCHR.FEN */
218  REG(uart_base | UART_LCRH) = 0;
219 
220  /* Restore LCHR configuration */
221  REG(uart_base | UART_LCRH) = lchr;
222 
223  /* UART Enable */
224  REG(uart_base | UART_CTL) |= UART_CTL_UARTEN;
225 }
226 /*---------------------------------------------------------------------------*/
227 static bool
228 permit_pm1(void)
229 {
230  const uart_regs_t *regs;
231 
232  for(regs = &uart_regs[0]; regs < &uart_regs[UART_INSTANCE_COUNT]; regs++) {
233  /* Note: UART_FR.TXFE reads 0 if the UART clock is gated. */
234  if((REG(SYS_CTRL_RCGCUART) & regs->sys_ctrl_rcgcuart_uart) != 0 &&
235  (REG(regs->base | UART_FR) & UART_FR_TXFE) == 0) {
236  return false;
237  }
238  }
239 
240  return true;
241 }
242 /*---------------------------------------------------------------------------*/
243 void
244 uart_init(uint8_t uart)
245 {
246  const uart_regs_t *regs;
247 
248  if(uart >= UART_INSTANCE_COUNT) {
249  return;
250  }
251  regs = &uart_regs[uart];
252  if(regs->rx.port < 0 || regs->tx.port < 0) {
253  return;
254  }
255 
256  lpm_register_peripheral(permit_pm1);
257 
258  /* Enable clock for the UART while Running, in Sleep and Deep Sleep */
259  REG(SYS_CTRL_RCGCUART) |= regs->sys_ctrl_rcgcuart_uart;
260  REG(SYS_CTRL_SCGCUART) |= regs->sys_ctrl_scgcuart_uart;
261  REG(SYS_CTRL_DCGCUART) |= regs->sys_ctrl_dcgcuart_uart;
262 
263  /* Run on SYS_DIV */
264  REG(regs->base | UART_CC) = 0;
265 
266  /*
267  * Select the UARTx RX pin by writing to the IOC_UARTRXD_UARTn register
268  *
269  * The value to be written will be on of the IOC_INPUT_SEL_Pxn defines from
270  * ioc.h. The value can also be calculated as:
271  *
272  * (port << 3) + pin
273  */
274  REG(regs->ioc_uartrxd_uart) = (regs->rx.port << 3) + regs->rx.pin;
275 
276  /*
277  * Pad Control for the TX pin:
278  * - Set function to UARTn TX
279  * - Output Enable
280  */
281  ioc_set_sel(regs->tx.port, regs->tx.pin, regs->ioc_pxx_sel_uart_txd);
282  ioc_set_over(regs->tx.port, regs->tx.pin, IOC_OVERRIDE_OE);
283 
284  /* Set RX and TX pins to peripheral mode */
286  GPIO_PIN_MASK(regs->tx.pin));
288  GPIO_PIN_MASK(regs->rx.pin));
289 
290  /*
291  * UART Interrupt Masks:
292  * Acknowledge RX and RX Timeout
293  * Acknowledge Framing, Overrun and Break Errors
294  */
295  REG(regs->base | UART_IM) = UART_IM_RXIM | UART_IM_RTIM;
296  REG(regs->base | UART_IM) |= UART_IM_OEIM | UART_IM_BEIM | UART_IM_FEIM;
297 
298  REG(regs->base | UART_IFLS) =
300 
301  /* Make sure the UART is disabled before trying to configure it */
302  REG(regs->base | UART_CTL) = UART_CTL_VALUE;
303 
304  /* Baud Rate Generation */
305  REG(regs->base | UART_IBRD) = regs->ibrd;
306  REG(regs->base | UART_FBRD) = regs->fbrd;
307 
308  /* UART Control: 8N1 with FIFOs */
309  REG(regs->base | UART_LCRH) = UART_LCRH_WLEN_8 | UART_LCRH_FEN;
310 
311  /*
312  * Enable hardware flow control (RTS/CTS) if requested.
313  * Note that hardware flow control is available only on UART1.
314  */
315  if(regs->cts.port >= 0) {
316  REG(IOC_UARTCTS_UART1) = ioc_input_sel(regs->cts.port, regs->cts.pin);
317  GPIO_PERIPHERAL_CONTROL(GPIO_PORT_TO_BASE(regs->cts.port), GPIO_PIN_MASK(regs->cts.pin));
318  ioc_set_over(regs->cts.port, regs->cts.pin, IOC_OVERRIDE_DIS);
319  REG(UART_1_BASE | UART_CTL) |= UART_CTL_CTSEN;
320  }
321 
322  if(regs->rts.port >= 0) {
323  ioc_set_sel(regs->rts.port, regs->rts.pin, IOC_PXX_SEL_UART1_RTS);
324  GPIO_PERIPHERAL_CONTROL(GPIO_PORT_TO_BASE(regs->rts.port), GPIO_PIN_MASK(regs->rts.pin));
325  ioc_set_over(regs->rts.port, regs->rts.pin, IOC_OVERRIDE_OE);
326  REG(UART_1_BASE | UART_CTL) |= UART_CTL_RTSEN;
327  }
328 
329  /* UART Enable */
330  REG(regs->base | UART_CTL) |= UART_CTL_UARTEN;
331 
332  /* Enable UART0 Interrupts */
333  nvic_interrupt_enable(regs->nvic_int);
334 }
335 /*---------------------------------------------------------------------------*/
336 void
337 uart_set_input(uint8_t uart, int (* input)(unsigned char c))
338 {
339  if(uart >= UART_INSTANCE_COUNT) {
340  return;
341  }
342 
343  input_handler[uart] = input;
344 }
345 /*---------------------------------------------------------------------------*/
346 void
347 uart_write_byte(uint8_t uart, uint8_t b)
348 {
349  uint32_t uart_base;
350 
351  if(uart >= UART_INSTANCE_COUNT) {
352  return;
353  }
354  uart_base = uart_regs[uart].base;
355 
356  /* Block if the TX FIFO is full */
357  while(REG(uart_base | UART_FR) & UART_FR_TXFF);
358 
359  REG(uart_base | UART_DR) = b;
360 }
361 /*---------------------------------------------------------------------------*/
362 void
363 uart_isr(uint8_t uart)
364 {
365  uint32_t uart_base;
366  uint16_t mis;
367 
368  ENERGEST_ON(ENERGEST_TYPE_IRQ);
369 
370  uart_base = uart_regs[uart].base;
371 
372  /* Store the current MIS and clear all flags early, except the RTM flag.
373  * This will clear itself when we read out the entire FIFO contents */
374  mis = REG(uart_base | UART_MIS) & 0x0000FFFF;
375 
376  REG(uart_base | UART_ICR) = 0x0000FFBF;
377 
378  if(mis & (UART_MIS_RXMIS | UART_MIS_RTMIS)) {
379  while(!(REG(uart_base | UART_FR) & UART_FR_RXFE)) {
380  if(input_handler[uart] != NULL) {
381  input_handler[uart]((unsigned char)(REG(uart_base | UART_DR) & 0xFF));
382  } else {
383  /* To prevent an Overrun Error, we need to flush the FIFO even if we
384  * don't have an input_handler. Use mis as a data trash can */
385  mis = REG(uart_base | UART_DR);
386  }
387  }
388  } else if(mis & (UART_MIS_OEMIS | UART_MIS_BEMIS | UART_MIS_FEMIS)) {
389  /* ISR triggered due to some error condition */
390  reset(uart_base);
391  }
392 
393  ENERGEST_OFF(ENERGEST_TYPE_IRQ);
394 }
395 /*---------------------------------------------------------------------------*/
396 #define UART_ISR(u) void uart##u##_isr(void) { uart_isr(u); }
397 UART_ISR(0)
398 UART_ISR(1)
399 
400 /** @} */
#define GPIO_PORT_TO_BASE(PORT)
Converts a port number to the port base address.
Definition: gpio.h:276
#define SYS_CTRL_RCGCUART_UART0
UART0 Clock, CPU running.
Definition: sys-ctrl.h:198
#define UART_FR
UART flag.
Definition: uart.h:69
#define NVIC_INT_UART1
UART1.
Definition: nvic.h:74
#define NVIC_INT_UART0
UART0.
Definition: nvic.h:73
#define UART_CTL_RTSEN
UART RTS flow-control enable (UART1 only)
Definition: uart.h:169
#define UART_CTL_CTSEN
UART CTS flow-control enable (UART1 only)
Definition: uart.h:168
#define SYS_CTRL_DCGCUART_UART0
UART0 Clock, PM0.
Definition: sys-ctrl.h:212
#define UART_DR
UART data.
Definition: uart.h:66
#define SYS_CTRL_DCGCUART
UART[1:0] clocks - PM0.
Definition: sys-ctrl.h:75
#define UART_IM_RXIM
UART receive interrupt mask.
Definition: uart.h:222
Header file with register and macro declarations for the cc2538 GPIO module.
void uart_set_input(uint8_t uart, int(*input)(unsigned char c))
Assigns a callback to be called when the UART receives a byte.
Definition: uart.c:337
void uart_init(const unsigned int uart_num, uint32_t module_clk_hz, const uint32_t baud)
Initialize UART.
Definition: uart.c:154
#define UART_IM_BEIM
UART break error mask.
Definition: uart.h:217
#define SYS_CTRL_SCGCUART_UART1
UART1 Clock, CPU IDLE.
Definition: sys-ctrl.h:204
#define UART1_CONF_BAUD_RATE
Default UART1 baud rate.
Definition: contiki-conf.h:145
#define SYS_CTRL_RCGCUART_UART1
UART1 Clock, CPU running.
Definition: sys-ctrl.h:197
#define UART_MIS
UART masked interrupt status.
Definition: uart.h:78
void ioc_set_over(uint8_t port, uint8_t pin, uint8_t over)
Set Port:Pin override function.
Definition: ioc.c:54
#define NULL
The null pointer.
Header file with declarations for the I/O Control module.
#define UART_CTL_UARTEN
UART enable.
Definition: uart.h:179
#define SYS_CTRL_SCGCUART
UART[1:0] clocks - sleep mode.
Definition: sys-ctrl.h:74
#define UART_IFLS_TXIFLSEL_1_2
UART TX FIFO &gt;= 1/2 empty.
Definition: uart.h:204
#define UART_IFLS_RXIFLSEL_1_8
UART RX FIFO &gt;= 1/8 full.
Definition: uart.h:196
#define UART_IM_RTIM
UART receive time-out mask.
Definition: uart.h:220
#define GPIO_PERIPHERAL_CONTROL(PORT_BASE, PIN_MASK)
Configure the pin to be under peripheral control with PIN_MASK of port with PORT_BASE.
Definition: gpio.h:206
#define UART_FR_TXFE
UART transmit FIFO empty.
Definition: uart.h:118
void nvic_interrupt_enable(uint32_t intr)
Enables interrupt intr.
Definition: nvic.c:64
#define UART_MIS_OEMIS
UART overrun err masked stat.
Definition: uart.h:250
#define ioc_input_sel(port, pin)
Generates an IOC_INPUT_SEL_PXn value from a port/pin number.
Definition: ioc.h:270
#define UART_FR_TXFF
UART transmit FIFO full.
Definition: uart.h:120
#define IOC_OVERRIDE_DIS
Override Disabled.
Definition: ioc.h:226
#define UART_LCRH
UART line control.
Definition: uart.h:73
Header file with register manipulation macro definitions.
Header file for the energy estimation mechanism
void ioc_set_sel(uint8_t port, uint8_t pin, uint8_t sel)
Function select for Port:Pin.
Definition: ioc.c:60
#define UART_IM_FEIM
UART framing error.
Definition: uart.h:219
#define UART_IM
UART interrupt mask.
Definition: uart.h:76
#define UART_CC
UART clock configuration.
Definition: uart.h:87
Header file for the cc2538 System Control driver.
#define UART_MIS_FEMIS
UART framing err masked stat.
Definition: uart.h:253
#define UART_LCRH_FEN
UART enable FIFOs.
Definition: uart.h:149
#define UART_FBRD
UART BAUD divisor: fractional.
Definition: uart.h:72
#define UART_CTL
UART control.
Definition: uart.h:74
#define IOC_OVERRIDE_OE
Output Enable.
Definition: ioc.h:222
#define UART_MIS_BEMIS
UART break err masked stat.
Definition: uart.h:251
#define UART_IFLS
UART interrupt FIFO level.
Definition: uart.h:75
#define SYS_CTRL_SCGCUART_UART0
UART0 Clock, CPU IDLE.
Definition: sys-ctrl.h:205
#define UART_MIS_RTMIS
UART RX time-out masked stat.
Definition: uart.h:254
void lpm_register_peripheral(lpm_periph_permit_pm1_func_t permit_pm1_func)
Register a peripheral function which will get called by the LPM module to get &#39;permission&#39; to drop to...
void uart_write_byte(uint8_t uart, uint8_t b)
Sends a single character down the UART.
Definition: uart.c:347
#define GPIO_PIN_MASK(PIN)
Converts a pin number to a pin mask.
Definition: gpio.h:268
#define UART_ECR
UART RX status and err clear.
Definition: uart.h:68
#define UART_ICR
UART interrupt clear.
Definition: uart.h:79
#define UART_FR_RXFE
UART receive FIFO empty.
Definition: uart.h:121
#define SYS_CTRL_DCGCUART_UART1
UART1 Clock, PM0.
Definition: sys-ctrl.h:211
#define UART_IBRD
UART BAUD divisor: integer.
Definition: uart.h:71
#define IOC_UARTCTS_UART1
UART1 CTS.
Definition: ioc.h:126
#define UART_IM_OEIM
UART overrun error mask.
Definition: uart.h:216
#define SYS_CTRL_RCGCUART
UART[1:0] clocks - active mode.
Definition: sys-ctrl.h:73
#define IOC_UARTRXD_UART0
UART0 RX.
Definition: ioc.h:125
#define UART_MIS_RXMIS
UART RX masked intr stat.
Definition: uart.h:256
#define IOC_UARTRXD_UART1
UART1 RX.
Definition: ioc.h:127
#define UART0_CONF_BAUD_RATE
Default UART0 baud rate.
Definition: contiki-conf.h:141