osd-contiki/tests/uart1-loopback.c

21 lines
316 B
C
Raw Normal View History

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