信長 平良 / Mbed 2 deprecated Serial_test

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
odanomatuei
Date:
Tue Aug 12 00:06:52 2014 +0000
Commit message:
mbed???????????????????????

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 1315a1939004 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Aug 12 00:06:52 2014 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+ 
+Serial pc(USBTX, USBRX);
+Serial gps(p9,p10);
+void gpsRx() {
+    char ch;
+    ch = pc.getc();
+    gps.putc(ch);
+}
+void pcRx(){
+    char ch;
+    ch = gps.getc();
+    pc.putc(ch);
+    }
+int main() {
+    pc.baud(4800);
+    gps.baud(4800);
+    pc.attach(gpsRx, Serial::RxIrq);
+    gps.attach(pcRx, Serial::RxIrq);
+    while (1) {
+    }
+}
+/*
+int main(){
+    while(1){
+     pc.putc(gps.getc())  ; 
+    }   
+}*/
diff -r 000000000000 -r 1315a1939004 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Aug 12 00:06:52 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file