Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:a1601df537a8, committed 2011-04-15
- Comitter:
- kinemax
- Date:
- Fri Apr 15 08:00:21 2011 +0000
- Commit message:
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MODSERIAL.lib Fri Apr 15 08:00:21 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/AjK/code/MODSERIAL/#6c9b57c14868
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Apr 15 08:00:21 2011 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#define BAUD 115200
+#define TX_PIN p9
+#define RX_PIN p10
+
+ #include "MODSERIAL.h"
+
+ DigitalOut led1(LED1);
+ DigitalOut led2(LED2);
+ DigitalOut led3(LED3);
+ DigitalOut led4(LED4);
+
+ MODSERIAL pc(USBTX, USBRX);
+
+ MODSERIAL uart(TX_PIN, RX_PIN);
+
+
+ int main()
+ {
+ pc.baud(BAUD);
+ uart.baud(BAUD);
+ //pc.printf("Start\n\r");
+
+ // Transparent uart<->usb - working !
+ while(1)
+ {
+ if( pc.readable())
+ {led1=1; led4=0; uart.putc(pc.getc());}
+ if( uart.readable())
+ {led4=1; led1=0; pc.putc(uart.getc());}
+ }
+ }
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Apr 15 08:00:21 2011 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912