osd-contiki/tests/uart1-loopback.c
Mariano Alvira 87cd9c7a36 update build system for board specific code that's 'local' to the
program you are building.

update tests to consolidate common code.
2010-02-26 14:04:10 -05:00

23 lines
371 B
C

#include <mc1322x.h>
#include <board.h>
#include "tests.h"
/* INC = 767; MOD = 9999 works: 115200 @ 24 MHz 16 bit sample */
#define INC 767
#define MOD 9999
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;
}
}
}