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
Revision 13:10108cd3ad23, committed 2018-06-08
- Comitter:
- bqam
- Date:
- Fri Jun 08 11:18:19 2018 +0500
- Parent:
- 12:a04f7eeece23
- Child:
- 14:4b22bd505b93
- Commit message:
- Power off function added
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 May 31 10:59:11 2018 +0500 +++ b/gnss.cpp Fri Jun 08 11:18:19 2018 +0500 @@ -50,6 +50,14 @@ sendUbx(0x02, 0x41, &msg, sizeof(msg)); } +void GnssParser::cutOffPower(void) +{ + //Disabling PA15 to cut off power supply + if (_gnssEnable != NULL) + *_gnssEnable = 0; + wait_ms(1); +} + void GnssParser::_powerOn(void) { if (_gnssEnable != NULL) {
--- a/gnss.h Thu May 31 10:59:11 2018 +0500 +++ b/gnss.h Fri Jun 08 11:18:19 2018 +0500 @@ -168,6 +168,11 @@ * edge on the serial port on the external interrupt pin. */ void powerOff(void); + + /** Cuts off the power supply of GNSS by disabling gnssEnable pin + * Backup supply is provided, can turn it on again by enabling PA15 + */ + void cutOffPower(void); /** get the first character of a NMEA field. * @param ix the index of the field to find.