38 #include "dev/uart0.h" 39 #include "dev/watchdog.h" 40 #include "isr_compat.h" 42 static int (*uart0_input_handler)(
unsigned char c);
54 uart0_set_input(
int (*
input)(
unsigned char c))
56 uart0_input_handler =
input;
60 uart0_writeb(
unsigned char c)
64 while((UCA0STAT & UCBUSY));
81 ubr = (MSP430_CPU_SPEED / ubr);
83 UCA0BR1 = (ubr >> 8) & 0xff;
101 ISR(USCI_A0, uart0_rx_interrupt)
106 if(UCA0STAT & UCRXERR) {
110 if(uart0_input_handler != NULL) {
111 if(uart0_input_handler(c)) {
static uint8_t transmitting(void)
Check the RF's TX status.
void uart0_init(unsigned long ubr)
Initialize the RS232 port.
void watchdog_periodic(void)
Writes the WDT clear sequence.
static void input(void)
Process a received 6lowpan packet.