osd-contiki/tests/uart1-loopback.c

22 lines
315 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-02 22:08:36 +01:00
uart1_init(INC,MOD);
2010-02-24 20:45:45 +01:00
uint8_t c;
while(1) {
2010-02-24 20:45:45 +01:00
if(*UART1_CON > 0) {
/* Receive buffer isn't empty */
/* read a byte and write it to the transmit buffer */
2010-02-24 20:45:45 +01:00
c = *UART1_DATA;
*UART1_DATA = c;
}
2010-02-24 20:45:45 +01:00
}
}