This class provides an API to communicate with a u-blox GNSS chip. The files here were originally part of the C027_Support library (https://developer.mbed.org/teams/ublox/code/C027_Support/ at revision 138:dafbbf31bf76) but have been separated out, primarily for use on the u-blox C030 board where the cellular interace portion of the C027_Support library will instead be provided through the new mbed Cellular API.

Dependents:   example-ublox-at-cellular-interface-ext example-low-power-sleep example-C030-out-of-box-demo example-C030-out-of-box-demo ... more

Files at this revision

API Documentation at this revision

Comitter:
RobMeades
Date:
Thu May 04 16:29:39 2017 +0000
Parent:
2:b10ca4aa2e5e
Child:
4:82308d600690
Commit message:
Remove GNSSPWR pin as this is handled in board initialisation.

Changed in this revision

gnss.cpp Show annotated file Show diff for this revision Revisions of this file
gnss.h Show annotated file Show diff for this revision Revisions of this file
--- a/gnss.cpp	Thu Apr 13 14:45:17 2017 +0000
+++ b/gnss.cpp	Thu May 04 16:29:39 2017 +0000
@@ -25,13 +25,9 @@
 
 GnssParser::GnssParser(void)
 {
-    // Create the power pins but set everything to disabled
-    _gnssPower = NULL;
+    // Create the enable pin but set everything to disabled
     _gnssEnable = NULL;
     
-#if defined GNSSPWR && defined TARGET_UBLOX_C030 /* TODO  */
-    _gnssPower = new DigitalInOut(GNSSPWR, PIN_OUTPUT, OpenDrain, 0);
-#endif
 #if defined GNSSEN && defined TARGET_UBLOX_C030 /* TODO  */
     _gnssEnable = new DigitalInOut(GNSSEN, PIN_OUTPUT, PushPullNoPull, 0);
 #endif
@@ -39,12 +35,6 @@
 
 GnssParser::~GnssParser(void)
 {
-    // Set the power pins to lowest power state before ending
-    if (_gnssPower != NULL) {
-       *_gnssPower = 0;
-        delete _gnssPower;
-    }
-    
     if (_gnssEnable != NULL) {
         *_gnssEnable = 0;
         delete _gnssEnable;
@@ -60,11 +50,6 @@
 
 void GnssParser::_powerOn(void)
 {
-    // Power up and enable the module
-    if (_gnssPower != NULL) {
-       *_gnssPower = 1;
-    }
-    wait_ms (1);
     if (_gnssEnable != NULL) {
        *_gnssEnable = 1;
     }
--- a/gnss.h	Thu Apr 13 14:45:17 2017 +0000
+++ b/gnss.h	Thu May 04 16:29:39 2017 +0000
@@ -188,7 +188,6 @@
     
     static const char _toHex[16]; //!< num to hex conversion
     DigitalInOut *_gnssEnable; //!< IO pin that enables GNSS
-    DigitalInOut *_gnssPower; //!< IO pin that enables power to GNSS
 };
 
 /** GNSS class which uses a serial port