Contiki 2.6
|
00001 #ifndef UART_0_H 00002 #define UART_0_H 00003 00004 #include "contiki-conf.h" 00005 00006 #include "cc2430_sfr.h" 00007 #include "8051def.h" 00008 #include "uart.h" 00009 00010 /*---------------------------------------------------------------------------*/ 00011 /* UART0 Enable - Disable */ 00012 #ifdef UART_ZERO_CONF_ENABLE 00013 #define UART_ZERO_ENABLE UART_ZERO_CONF_ENABLE 00014 #else 00015 #define UART_ZERO_ENABLE 0 00016 #endif 00017 /*---------------------------------------------------------------------------*/ 00018 /* UART0 Function Declarations */ 00019 #if UART_ZERO_ENABLE 00020 void uart0_init(); 00021 void uart0_writeb(uint8_t byte); 00022 00023 void uart0_set_input(int (*input)(unsigned char c)); 00024 00025 void uart0_rx_ISR( void ) __interrupt (URX0_VECTOR); 00026 void uart0_tx_ISR( void ) __interrupt (UTX0_VECTOR); 00027 /* Macro to turn on / off UART RX Interrupt */ 00028 #define UART0_RX_INT(v) IEN0_URX0IE = v 00029 #endif 00030 00031 #endif /* UART_0_H */