nsp specific components for the NSP version of the impact endpoint

Dependents:   mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet mbed_nsp_endpoint_nxp

Revision:
6:edf306673e54
Parent:
5:94d000e6fa70
Child:
7:0207dfb9c36b
--- a/MBEDEndpoint.cpp	Fri Mar 28 17:53:14 2014 +0000
+++ b/MBEDEndpoint.cpp	Mon Mar 31 19:13:10 2014 +0000
@@ -33,7 +33,7 @@
  extern void closedown(int code);
   
  // default constructor
- MBEDEndpoint::MBEDEndpoint(ErrorHandler *error_handler,EthernetInterface *ethernet) : BaseClass(error_handler,NULL) {
+ MBEDEndpoint::MBEDEndpoint(ErrorHandler *error_handler,void *ethernet) : BaseClass(error_handler,NULL) {
      bool success = true;
      this->m_preferences = NULL;
      this->m_instance_id = 0;
@@ -52,7 +52,9 @@
 #endif     
      if (success) this->initNSPAddress();
      if (PL_ENABLE && success) this->logger()->log("Philips Light ID: %d Philips Gateway IP: %s",PL_LIGHT_ID,PL_GW_ADDRESS);
-     if (success) success = this->initializeEthernet(ethernet);
+#ifndef CELLULAR_NETWORK
+     if (success) success = this->initializeEthernet((EthernetInterface *)ethernet);
+#endif
      if (success) this->logger()->turnLEDYellow();
      if (success) success = this->initializeTransports();
      if (success) success = this->initializePersonalities();
@@ -67,7 +69,9 @@
      if (success) this->logger()->turnLEDYellow();
      if (success) success = this->closePersonalities();
      if (success) success = this->closeTransports();
+#ifndef CELLULAR_NETWORK
      if (success) success = this->closeEthernet();
+#endif
      if (success) this->logger()->turnLEDBlue();
  }
  
@@ -189,6 +193,7 @@
       return success;
  }
  
+ #ifndef CELLULAR_NETWORK
  // initialize our Ethernet 
  bool MBEDEndpoint::initializeEthernet(EthernetInterface *ethernet) {
      bool success = false;
@@ -217,6 +222,7 @@
      }
      return success;
  }
+ #endif
  
  // close down the Personalities
  bool MBEDEndpoint::closePersonalities() {
@@ -244,12 +250,14 @@
      return success;
  }
  
+ #ifndef CELLULAR_NETWORK
  // close down our Ethernet 
  bool MBEDEndpoint::closeEthernet() {
      this->logger()->log("Closing down Ethernet...");
      if (this->m_ethernet != NULL) this->m_ethernet->disconnect();
      return true;
  }
+ #endif
  
  // main running loop
  void MBEDEndpoint::run() {