Core Base Classes for the Light Endpoints

Dependencies:   BufferedSerial

Dependents:   mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more

Revision:
20:f2dbbd852e08
Parent:
18:bc165829bb88
Child:
21:cfdaee0a2b50
--- a/ErrorHandler.cpp	Wed Feb 26 07:22:26 2014 +0000
+++ b/ErrorHandler.cpp	Wed Feb 26 18:59:01 2014 +0000
@@ -30,7 +30,7 @@
 PwmOut b (p25);
 
 // close down connections
- extern void closedown();
+ extern void closedown(int code);
  
  // default constructor
  ErrorHandler::ErrorHandler(MODSERIAL *pc,C12832_LCD *lcd) {
@@ -74,7 +74,7 @@
     char c = this->m_pc->getc();
     if (c == 0x03) {    // CTRL-C ASCII
         this->m_pc->printf("ctrl-c: closing down...\r\n");
-        closedown();
+        closedown(1);
     }
  }
  
@@ -84,7 +84,7 @@
         char c = this->m_pc->getc();
         if (c == 0x03) {    // CTRL-C ASCII
             this->m_pc->printf("ctrl-c: closing down...\r\n");
-            closedown();
+            closedown(1);
         }
     }
 }