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
Diff: MBEDEndpoint.cpp
- Revision:
- 19:3cecccc1a3d4
- Parent:
- 18:0e32c41b238e
- Child:
- 20:def10d2d9273
--- a/MBEDEndpoint.cpp Mon Jun 30 17:38:46 2014 +0000 +++ b/MBEDEndpoint.cpp Mon Jun 30 22:47:07 2014 +0000 @@ -33,7 +33,7 @@ extern void closedown(int code); // default constructor - MBEDEndpoint::MBEDEndpoint(ErrorHandler *error_handler,void *transports,void *pinouts) : BaseClass(error_handler,NULL) { + MBEDEndpoint::MBEDEndpoint(ErrorHandler *error_handler,void *transports,void *extra) : BaseClass(error_handler,NULL) { bool success = true; this->m_preferences = NULL; this->m_instance_id = 0; @@ -55,8 +55,10 @@ #ifdef CELLULAR_NETWORK this->m_cellular_modem = NULL; this->m_gps = NULL; - if (success) success = this->initializeCellularModem(transports,pinouts); - if (success) success = this->initializeGPSReceiver(pinouts); + this->logger()->log("initializing Cellular Modem..."); + if (success) success = this->initializeCellularModem(this->logger(),transports); + //this->logger()->log("initializing GPS Receiver..."); + //if (success) success = this->initializeGPSReceiver(this,extra); #else if (success) success = this->initializeEthernet((EthernetInterface *)transports); #endif @@ -209,22 +211,22 @@ } #ifdef CELLULAR_NETWORK - bool MBEDEndpoint::initializeCellularModem(void *transport,void *pinouts) { + bool MBEDEndpoint::initializeCellularModem(void *transport,void *modem) { bool success = false; // initialize - if (this->m_cellular_modem == NULL) this->m_cellular_modem = new MBEDUbloxCellRadio(this->logger(),this,(UBLOX_MODEM *)transport,(C027 *)pinouts); + if (this->m_cellular_modem == NULL) this->m_cellular_modem = new MBEDUbloxCellRadio(this->logger(),(void *)this,modem); if (this->m_cellular_modem != NULL) success = this->m_cellular_modem->connect(); // return our status return success; } - bool MBEDEndpoint::initializeGPSReceiver(void *pinouts) { + bool MBEDEndpoint::initializeGPSReceiver(void *gps) { bool success = false; // initialize - if (this->m_gps == NULL) this->m_gps = new MBEDUbloxGPS(this->logger(),this,(C027 *)pinouts); + if (this->m_gps == NULL) this->m_gps = new MBEDUbloxGPS(this->logger(),(void *)this,gps); if (this->m_gps != NULL) success = this->m_gps->connect(); // return our status