osd-contiki/tests/uart1-loopback.c

20 lines
298 B
C
Raw Normal View History

2010-02-24 14:45:45 -05:00
#include <mc1322x.h>
#include <board.h>
#include "tests.h"
2010-02-26 14:22:28 -05:00
#include "config.h"
void main(void) {
2010-03-02 16:08:36 -05:00
2010-03-09 18:23:40 -05:00
uart1_init(INC,MOD,SAMP);
2010-02-24 14:45:45 -05:00
while(1) {
2010-03-09 18:23:40 -05:00
if(uart1_can_get()) {
/* Receive buffer isn't empty */
/* read a byte and write it to the transmit buffer */
2010-03-09 18:23:40 -05:00
uart1_putc(uart1_getc());
}
2010-02-24 14:45:45 -05:00
}
}