contiki/tests/uart1-loopback.c
2010-02-26 14:22:28 -05:00

20 lines
292 B
C

#include <mc1322x.h>
#include <board.h>
#include "tests.h"
#include "config.h"
void main(void) {
uint8_t c;
while(1) {
if(*UART1_CON > 0) {
/* Receive buffer isn't empty */
/* read a byte and write it to the transmit buffer */
c = *UART1_DATA;
*UART1_DATA = c;
}
}
}