41 #include "dev/uart1.h"
42 #include "dev/watchdog.h"
45 #include "isr_compat.h"
47 static int (*uart1_input_handler)(
unsigned char c);
59 uart1_set_input(
int (*
input)(
unsigned char c))
61 uart1_input_handler =
input;
65 uart1_writeb(
unsigned char c)
69 while((UCA1STAT & UCBUSY));
75 #if ! NETSTACK_CONF_WITH_IPV4
106 UCA1CTL1 &= ~UCSWRST;
110 ISR(USCI_A1, uart1_rx_interrupt)
114 ENERGEST_ON(ENERGEST_TYPE_IRQ);
117 if(UCA1STAT & UCRXERR) {
121 if(uart1_input_handler !=
NULL) {
122 if(uart1_input_handler(c)) {
128 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
void uart1_init(unsigned long ubr)
Initalize the RS232 port.
static void input(void)
Process a received 6lowpan packet.
Header file for the energy estimation mechanism
#define NULL
The null pointer.
static uint8_t transmitting(void)
Check the RF's TX status.
void watchdog_periodic(void)
Writes the WDT clear sequence.
Header file for the ring buffer library