Chris Styles
/
mbedISP
Diff: main.cpp
- Revision:
- 0:3ce7085022d1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 26 10:14:48 2009 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" + +DigitalOut led1(LED1); +DigitalOut led2(LED2); + +Serial pc (USBTX,USBRX); +Serial target (p28,p27); + +int main() { + + pc.baud(115200); + target.baud(115200); + + while (1) { + + if (pc.readable()) { + target.putc(pc.getc()); + led1 = !led1; + } + + if (target.readable()) { + pc.putc(target.getc()); + led2 = !led2; + } + } +} +