Library for inclusion of main.cpp

Revision:
3:acea67392757
Parent:
0:8f99b3f2c3a8
Child:
4:582f7ce2f930
--- a/main.cpp	Tue Sep 09 20:45:08 2014 +0000
+++ b/main.cpp	Wed Sep 17 16:38:59 2014 +0000
@@ -16,9 +16,9 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
  
- // StatusReporter
- #include "StatusReporter.h"
-
+ #include "Definitions.h"
+ #include "ErrorHandler.h"
+ 
  // appboard LCD Panel
  #if _NXP_PLATFORM
     #include "C12832_lcd.h"
@@ -42,8 +42,14 @@
  HTTPClient http;
  
  // HARD RESET
-extern "C" void HardFault_Handler() { NVIC_SystemReset(); }
+ extern "C" void HardFault_Handler() { NVIC_SystemReset(); }
 
+ #ifdef MAC_ADDRESS
+ char mac[6] = {MAC_ADDRESS};
+ extern "C" void mbed_mac_address(char *s) { for(int i=0;i<6;++i) s[i] = mac[i]; }
+ char fmt_mac[RESOURCE_VALUE_LEN+1];
+ #endif
+ 
  // Main Task...
  void mainTask(void const *v) {
     // create our object instances 
@@ -55,7 +61,7 @@
 #endif
     
     // announce
-    logger.log("ARM/DreamForce 2014 mbed Status Reporter v%s",APP_VERSION);
+    logger.log("ARM/DreamForce 2014 Hello salesforce v%s",APP_VERSION);
     logger.turnLEDBlue();
     
     // initialize Ethernet
@@ -69,17 +75,16 @@
         // log our IP address (DHCP)
         logger.log("IP Address: %s",ethernet.getIPAddress());
         
-        // create the StatusReporter
-        StatusReporter status_reporter(&logger,(void *)&http);
+        // allocate something here...
         
         // entering main loop
-        logger.log("Entering Main Loop...\r\nScanning...");
+        logger.log("Entering Main Loop...\r\nStarting main loop...");
         logger.turnLEDGreen();
         
         // Enter the main loop
         while(true) {
-             // check and report on status updates
-             status_reporter.checkAndReportOnStatus();
+             // Do work with something here...
+             Thread::wait(10*WAIT_TIME_MS);;
           }
      }
      else {