Add a bunch of APNs
Fork of C027_Support by
Diff: GPS.cpp
- Revision:
- 75:ce6e12067d0c
- Parent:
- 74:208e3e32d263
- Child:
- 76:f7c3dd568dae
--- a/GPS.cpp Thu May 15 22:20:42 2014 +0000 +++ b/GPS.cpp Fri May 16 14:13:00 2014 +0000 @@ -258,7 +258,7 @@ #endif } -bool GPSSerial::init(void) +bool GPSSerial::init(PinName pn) { // send a byte to wakup the device again putc(0); @@ -301,12 +301,14 @@ #endif } -bool GPSI2C::init(void) +bool GPSI2C::init(PinName pn) { - DigitalOut pin(GPSINT, 0); - wait_us(1); - pin = 1; - RELAX_MS(100); + if (pn != NC) { + DigitalOut pin(pn, 0); + wait_us(1); + pin = 1; + RELAX_MS(100); + } return !I2C::write(_i2cAdr,®STREAM,sizeof(REGSTREAM)); }