2019-06-20 11:23:09 +00:00
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
|
|
#include "settings.h"
|
|
|
|
|
2019-06-24 14:47:00 +00:00
|
|
|
/*
|
2019-06-20 11:23:09 +00:00
|
|
|
void power_gps_wakeup() {
|
2019-06-24 14:47:00 +00:00
|
|
|
Serial.println(F("Warn: GPS wakeup isn't implemented yet."));
|
2019-06-20 11:23:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void power_gps_standby() {
|
2019-06-24 14:47:00 +00:00
|
|
|
Serial.println(F("Warn: GPS standby isn't implemented yet."));
|
2019-06-20 11:23:09 +00:00
|
|
|
}
|
2019-06-24 14:47:00 +00:00
|
|
|
*/
|
2019-06-20 11:23:09 +00:00
|
|
|
|
|
|
|
void power_off() {
|
2019-06-24 14:47:00 +00:00
|
|
|
Serial.println(F("[power] Shutting down"));
|
|
|
|
// Serial.println(F("[power] Switching GPS module to standby"));
|
|
|
|
// power_gps_standby();
|
2019-06-20 11:23:09 +00:00
|
|
|
|
2019-06-20 12:56:08 +00:00
|
|
|
Serial.println(F("[power] Signalling TPL5111"));
|
2019-06-20 11:23:09 +00:00
|
|
|
pinMode(PIN_TPL_DONE, OUTPUT);
|
|
|
|
digitalWrite(PIN_TPL_DONE, HIGH);
|
2019-06-20 12:56:08 +00:00
|
|
|
|
|
|
|
// Wait until we're turned off
|
|
|
|
while(true) delay(100);
|
2019-06-20 11:23:09 +00:00
|
|
|
}
|