Contiki 3.x
uart1.h
1 #ifndef UART_1_H
2 #define UART_1_H
3 
4 #include "contiki-conf.h"
5 
6 #include "cc2430_sfr.h"
7 #include "8051def.h"
8 #include "uart.h"
9 
10 /*---------------------------------------------------------------------------*/
11 /* UART1 Enable - Disable */
12 #ifdef UART_ONE_CONF_ENABLE
13 #define UART_ONE_ENABLE UART_ONE_CONF_ENABLE
14 #else
15 #define UART_ONE_ENABLE 0
16 #endif
17 /*---------------------------------------------------------------------------*/
18 /* UART1 Function Declarations */
19 #if UART_ONE_ENABLE
20 void uart1_init();
21 void uart1_writeb(uint8_t byte);
22 
23 void uart1_set_input(int (*input)(unsigned char c));
24 #if UART_ONE_CONF_WITH_INPUT
25 void uart1_rx_ISR(void) __interrupt(URX1_VECTOR);
26 void uart1_tx_ISR(void) __interrupt(UTX1_VECTOR);
27 /* Macro to turn on / off UART RX Interrupt */
28 #define UART1_RX_INT(v) do { IEN0_URX1IE = v; } while(0)
29 #else
30 #define UART1_RX_INT(v)
31 #endif /* UART_ONE_CONF_WITH_INPUT */
32 #else
33 #define uart1_init(...)
34 #define uart1_writeb(...)
35 #define uart1_set_input(...)
36 #define UART1_RX_INT(v)
37 #endif /* UART_ONE_ENABLE */
38 
39 #endif /* UART_1_H */
void uart1_init(unsigned long ubr)
Initalize the RS232 port.
Definition: uart1.c:143
CC2430 registers header file for CC2430.