Kosuke Furumoto
/
Nucleo_GPS
Nucleo_GPS
Revision 1:aec45e847ec3, committed 2016-08-16
- Comitter:
- Koob
- Date:
- Tue Aug 16 15:57:35 2016 +0000
- Parent:
- 0:8889ed33c550
- Commit message:
- Nucleo_GPS_Serial
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 8889ed33c550 -r aec45e847ec3 main.cpp --- a/main.cpp Mon Aug 08 02:05:09 2016 +0000 +++ b/main.cpp Tue Aug 16 15:57:35 2016 +0000 @@ -1,9 +1,10 @@ #include "mbed.h" - + +DigitalOut myled(LED1); Serial gps(D1, D0); // tx, rx Serial pc(USBTX, USBRX); // tx, rx -int main() { +void pc_rx() { unsigned char c; int i,rlock; @@ -54,4 +55,14 @@ } }//if }//while -}//main \ No newline at end of file +} + +int main(){ + gps.attach(pc_rx,Serial::RxIrq); + while(1) { + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + } +} \ No newline at end of file