SerialPassthrough & LED Blink

Dependencies:   mbed-src

Fork of SerialPassthrough by Austin Blackstone

Files at this revision

API Documentation at this revision

Comitter:
SteveKim
Date:
Tue Jun 23 04:09:00 2015 +0000
Parent:
5:96cb82af9996
Commit message:
LED Blink & SerialPassthrough for FRDM-KL25Z

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-src.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show diff for this revision Revisions of this file
diff -r 96cb82af9996 -r bfddd3c79358 main.cpp
--- a/main.cpp	Thu Apr 30 22:48:21 2015 +0000
+++ b/main.cpp	Tue Jun 23 04:09:00 2015 +0000
@@ -1,7 +1,12 @@
 #include "mbed.h"
 
+/*
 RawSerial  pc(USBTX, USBRX);
 RawSerial  dev(D1, D0);
+*/
+RawSerial pc(USBTX, USBRX); // tx, rx
+RawSerial dev(PTD3, PTD2); // tx, rx for FRDM-KL25Z
+
 DigitalOut led1(LED1);
 DigitalOut led4(LED4);
 
@@ -23,11 +28,18 @@
 
 int main()
 {
-    pc.baud(9600);
-    dev.baud(9600);
+    pc.baud(115200);
+    dev.baud(115200);
 
     pc.attach(&pc_recv, Serial::RxIrq);
     dev.attach(&dev_recv, Serial::RxIrq);
+    
+    for (int i=0; i<10; i++)
+    {        
+        led1 = !led1;
+        led4 = !led4;
+        wait(0.1);
+    }
 
     while(1) {
         sleep();
diff -r 96cb82af9996 -r bfddd3c79358 mbed-src.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-src.lib	Tue Jun 23 04:09:00 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-src/#8e5b2476066a
diff -r 96cb82af9996 -r bfddd3c79358 mbed.bld
--- a/mbed.bld	Thu Apr 30 22:48:21 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889
\ No newline at end of file