Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions variants/heltec_t114/T114Board.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ class T114Board : public NRF52BoardDCDC {
#ifdef LED_PIN
digitalWrite(LED_PIN, HIGH);
#endif
#ifdef NRF52_POWER_MANAGEMENT
initiateShutdown(SHUTDOWN_REASON_USER);
#else
#if ENV_INCLUDE_GPS == 1
pinMode(GPS_EN, OUTPUT);
digitalWrite(GPS_EN, LOW);
#endif
sd_power_system_off();
#endif
}
};
3 changes: 3 additions & 0 deletions variants/rak4631/RAK4631Board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const PowerMgtConfig power_config = {
void RAK4631Board::initiateShutdown(uint8_t reason) {
// Disable LoRa module power before shutdown
digitalWrite(SX126X_POWER_EN, LOW);
// RAK4631 has no buttons; clear DIO1 SENSE (set by RadioLib) so the
// floating pin doesn't trigger an immediate wakeup from SYSTEMOFF.
nrf_gpio_cfg_default(P_LORA_DIO_1);

if (reason == SHUTDOWN_REASON_LOW_VOLTAGE ||
reason == SHUTDOWN_REASON_BOOT_PROTECT) {
Expand Down
6 changes: 6 additions & 0 deletions variants/rak4631/RAK4631Board.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,10 @@ class RAK4631Board : public NRF52BoardDCDC {
const char* getManufacturerName() const override {
return "RAK 4631";
}

#ifdef NRF52_POWER_MANAGEMENT
void powerOff() override {
initiateShutdown(SHUTDOWN_REASON_USER);
}
#endif
};