support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.
Dependents: C027Interface C027Interface C027_SupportTest
Fork of C027_Support by
Diff: GPS.cpp
- Revision:
- 76:f7c3dd568dae
- Parent:
- 75:ce6e12067d0c
- Child:
- 95:8282dbbe1492
--- a/GPS.cpp Fri May 16 14:13:00 2014 +0000 +++ b/GPS.cpp Mon May 19 13:05:41 2014 +0000 @@ -6,15 +6,6 @@ #include "C027_api.h" #endif -GPSParser::~GPSParser(void) -{ - powerOff(); -#ifdef TARGET_UBLOX_C027 - if (_onboard) - c027_gps_powerOff(); -#endif -} - void GPSParser::powerOff(void) { // set the gps into backup mode using the command RMX-LPREQ @@ -258,6 +249,15 @@ #endif } +GPSSerial::~GPSSerial(void) +{ + powerOff(); +#ifdef TARGET_UBLOX_C027 + if (_onboard) + c027_gps_powerOff(); +#endif +} + bool GPSSerial::init(PinName pn) { // send a byte to wakup the device again @@ -301,6 +301,15 @@ #endif } +GPSI2C::~GPSI2C(void) +{ + powerOff(); +#ifdef TARGET_UBLOX_C027 + if (_onboard) + c027_gps_powerOff(); +#endif +} + bool GPSI2C::init(PinName pn) { if (pn != NC) {