gnss
Diff: gnss.cpp
- Revision:
- 4:82308d600690
- Parent:
- 3:2a1cd49ead85
- Child:
- 5:af4baf3c67f3
--- a/gnss.cpp Thu May 04 16:29:39 2017 +0000 +++ b/gnss.cpp Tue Jun 06 21:05:08 2017 +0100 @@ -28,8 +28,10 @@ // Create the enable pin but set everything to disabled _gnssEnable = NULL; -#if defined GNSSEN && defined TARGET_UBLOX_C030 /* TODO */ +#ifdef TARGET_UBLOX_C030 _gnssEnable = new DigitalInOut(GNSSEN, PIN_OUTPUT, PushPullNoPull, 0); +#elif TARGET_UBLOX_C027 + _gnssEnable = new DigitalOut(GNSSEN, 0); #endif } @@ -281,7 +283,7 @@ // ---------------------------------------------------------------- GnssSerial::GnssSerial(PinName tx /*= GNSSTXD */, PinName rx /*= GNSSRXD */, int baudrate /*= GNSSBAUD */, - int rxSize /*= 256 */, int txSize /*= 128 */) : + int rxSize /*= 256 */, int txSize /*= 128 */) : SerialPipe(tx, rx, baudrate, rxSize, txSize) { baud(baudrate); @@ -294,6 +296,9 @@ bool GnssSerial::init(PinName pn) { + // Unused (kept only for compatibility with the I2C version) + (void)pn; + // Power up and enable the module _powerOn();