mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 15:16:40 +00:00
nrf52_variants: override shutdownPeripherals instead of powerOff for TechoLite, TInpulse and TechoBoard (protect the gate)
This commit is contained in:
@@ -47,9 +47,9 @@ public:
|
|||||||
return "LilyGo T-Impulse-Plus";
|
return "LilyGo T-Impulse-Plus";
|
||||||
}
|
}
|
||||||
|
|
||||||
void powerOff() override {
|
void shutdownPeripherals() override {
|
||||||
// power off system
|
// power off system
|
||||||
NRF52Board::powerOff();
|
NRF52Board::shutdownPeripherals();
|
||||||
|
|
||||||
// turn off 3.3v
|
// turn off 3.3v
|
||||||
digitalWrite(RT9080_EN, LOW);
|
digitalWrite(RT9080_EN, LOW);
|
||||||
|
|||||||
@@ -87,11 +87,11 @@ void TechoCardBoard::turnOffLeds() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TechoCardBoard::powerOff() {
|
void TechoCardBoard::shutdownPeripherals() {
|
||||||
nrf_gpio_cfg_sense_input(BUTTON_PIN, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
|
nrf_gpio_cfg_sense_input(BUTTON_PIN, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
|
||||||
turnOffLeds();
|
turnOffLeds();
|
||||||
digitalWrite(PIN_PWR_EN, LOW);
|
digitalWrite(PIN_PWR_EN, LOW);
|
||||||
NRF52Board::powerOff();
|
NRF52Board::shutdownPeripherals();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public:
|
|||||||
return "LilyGo T-Echo Card";
|
return "LilyGo T-Echo Card";
|
||||||
}
|
}
|
||||||
|
|
||||||
void powerOff() override;
|
void shutdownPeripherals() override;
|
||||||
|
|
||||||
void toggleTorch();
|
void toggleTorch();
|
||||||
void turnOffLeds();
|
void turnOffLeds();
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ public:
|
|||||||
return "LilyGo T-Echo Lite";
|
return "LilyGo T-Echo Lite";
|
||||||
}
|
}
|
||||||
|
|
||||||
void powerOff() override {
|
void shutdownPeripherals() override {
|
||||||
NRF52Board::powerOff();
|
NRF52Board::shutdownPeripherals();
|
||||||
|
|
||||||
digitalWrite(PIN_VBAT_MEAS_EN, LOW);
|
digitalWrite(PIN_VBAT_MEAS_EN, LOW);
|
||||||
#ifdef LED_RED
|
#ifdef LED_RED
|
||||||
|
|||||||
Reference in New Issue
Block a user