Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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.