*** empty log message ***

This commit is contained in:
Antoine Drouin
2005-10-15 02:17:51 +00:00
parent 21c8e88122
commit d4dd36cd3d
+26
View File
@@ -0,0 +1,26 @@
#include "lpc2138.h"
#define TXD0_PIN 0
#define RXD0_PIN 1
#define TXD1_PIN 8
#define RXD1_PIN 9
int main (int argc, char** argv) {
/* TXD0 and TXD1 output */
IODIR0 |= (1<<TXD0_PIN)|(1<<TXD1_PIN);
/* RXD0 and RXD1 input */
IODIR0 &= ~((1<<RXD0_PIN)|(1<<RXD1_PIN));
while(1) {
if (IOPIN0 & (1<<RXD0_PIN))
IOSET0 = (1<<TXD1_PIN);
else
IOCLR0 = (1<<TXD1_PIN);
if (IOPIN0 & (1<<RXD1_PIN))
IOSET0 = (1<<TXD0_PIN);
else
IOCLR0 = (1<<TXD0_PIN);
}
return 0;
}