Henk Meewis / Mbed 2 deprecated USB_serial_LED_controller

Dependencies:   mbed

Fork of frdm_echo by Henk Meewis

Revision:
7:19da09fe546b
Parent:
5:03b7c237c4c4
Child:
8:b715912d684b
--- a/shell.cpp	Mon Apr 14 01:53:10 2014 +0000
+++ b/shell.cpp	Mon Apr 14 03:04:28 2014 +0000
@@ -1,6 +1,9 @@
 #include "mbed.h"
+#include "LEDColors.h"
 #include "shell.h"
 
+extern LEDColors *ledColors;
+
 // create contructor
 Shell::Shell(uint32_t thisBaudRate)
 {
@@ -33,10 +36,16 @@
         
         // see if this is a semi colon or a carriage return
         // if so, give a new line cursor
-        if((character == ';') || (character == 13)) usbSerial->printf("\n> ");
+        if((character == ';') || (character == 13)) {
+            usbSerial->printf("\n> ");
+            ledColors->flashWhite(10);
+        }
         
         // if not, just print the character
-        else usbSerial->printf("%c", character);        
+        else {
+            usbSerial->printf("%c", character);        
+            ledColors->flashGreen(10);
+        }
     }
 }
 //-----------------------------------------------------------------------------