Contiki-Inga 3.x
uart0.h
1 #ifndef UART_0_H
2 #define UART_0_H
3 
4 #include "contiki-conf.h"
5 
6 #include "cc2430_sfr.h"
7 #include "8051def.h"
8 #include "uart.h"
9 
10 /*---------------------------------------------------------------------------*/
11 /* UART0 Enable - Disable */
12 #ifdef UART_ZERO_CONF_ENABLE
13 #define UART_ZERO_ENABLE UART_ZERO_CONF_ENABLE
14 #else
15 #define UART_ZERO_ENABLE 0
16 #endif
17 /*---------------------------------------------------------------------------*/
18 /* UART0 Function Declarations */
19 #if UART_ZERO_ENABLE
20 void uart0_init();
21 void uart0_writeb(uint8_t byte);
22 
23 void uart0_set_input(int (* input)(unsigned char c));
24 
25 void uart0_rx_ISR(void) __interrupt(URX0_VECTOR);
26 void uart0_tx_ISR(void) __interrupt(UTX0_VECTOR);
27 /* Macro to turn on / off UART RX Interrupt */
28 #define UART0_RX_INT(v) do { IEN0_URX0IE = v; } while(0)
29 #endif
30 
31 #endif /* UART_0_H */