mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-07-21 15:32:53 +00:00
Merge pull request #2975 from fdlamotte/nrf52_boards--use-shutdownPeripherals-on-TInpulse-and-TEchoBoard
nrf52_variants: override shutdownPeripherals instead of powerOff for …
This commit is contained in:
@@ -47,9 +47,9 @@ public:
|
||||
return "LilyGo T-Impulse-Plus";
|
||||
}
|
||||
|
||||
void powerOff() override {
|
||||
void shutdownPeripherals() override {
|
||||
// power off system
|
||||
NRF52Board::powerOff();
|
||||
NRF52Board::shutdownPeripherals();
|
||||
|
||||
// turn off 3.3v
|
||||
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);
|
||||
turnOffLeds();
|
||||
digitalWrite(PIN_PWR_EN, LOW);
|
||||
NRF52Board::powerOff();
|
||||
NRF52Board::shutdownPeripherals();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
return "LilyGo T-Echo Card";
|
||||
}
|
||||
|
||||
void powerOff() override;
|
||||
void shutdownPeripherals() override;
|
||||
|
||||
void toggleTorch();
|
||||
void turnOffLeds();
|
||||
|
||||
@@ -21,8 +21,8 @@ public:
|
||||
return "LilyGo T-Echo Lite";
|
||||
}
|
||||
|
||||
void powerOff() override {
|
||||
NRF52Board::powerOff();
|
||||
void shutdownPeripherals() override {
|
||||
NRF52Board::shutdownPeripherals();
|
||||
|
||||
digitalWrite(PIN_VBAT_MEAS_EN, LOW);
|
||||
#ifdef LED_RED
|
||||
|
||||
Reference in New Issue
Block a user