Fixed poweroff for NRF52 boards

This commit is contained in:
Kevin Le committed 2026-06-21 23:14:03 +07:00
1 parent ddf8387703
commit f5d9e18517
20 files changed
+17 -30

No files matched your search

@@ -47,7 +47,7 @@ public:
uint32_t button_pin = PIN_BUTTON1;
nrf_gpio_cfg_input(button_pin, NRF_GPIO_PIN_PULLUP);
nrf_gpio_cfg_sense_set(button_pin, NRF_GPIO_PIN_SENSE_LOW);
sd_power_system_off();
NRF52Board::powerOff();
}
};
@@ -47,7 +47,7 @@ public:
uint32_t button_pin = PIN_BUTTON1;
nrf_gpio_cfg_input(button_pin, NRF_GPIO_PIN_PULLUP);
nrf_gpio_cfg_sense_set(button_pin, NRF_GPIO_PIN_SENSE_LOW);
sd_power_system_off();
NRF52Board::powerOff();
}
};
@@ -47,7 +47,7 @@ public:
uint32_t button_pin = PIN_BUTTON1;
nrf_gpio_cfg_input(button_pin, NRF_GPIO_PIN_PULLUP);
nrf_gpio_cfg_sense_set(button_pin, NRF_GPIO_PIN_SENSE_LOW);
sd_power_system_off();
NRF52Board::powerOff();
}
};
@@ -38,7 +38,7 @@ public:
uint32_t button_pin = PIN_BUTTON1;
nrf_gpio_cfg_input(button_pin, NRF_GPIO_PIN_PULLUP);
nrf_gpio_cfg_sense_set(button_pin, NRF_GPIO_PIN_SENSE_LOW);
sd_power_system_off();
NRF52Board::powerOff();
}
};
-4
View File
@@ -37,8 +37,4 @@ public:
digitalWrite(P_LORA_TX_LED, LOW); // turn TX LED off
}
#endif
void powerOff() override {
sd_power_system_off();
}
};
@@ -53,7 +53,7 @@ public:
digitalWrite(RT9080_EN, LOW);
// power off system
sd_power_system_off();
NRF52Board::powerOff();
}
};
+1 -1
View File
@@ -39,6 +39,6 @@ public:
#ifdef PIN_PWR_EN
digitalWrite(PIN_PWR_EN, LOW);
#endif
sd_power_system_off();
NRF52Board::powerOff();
}
};
+1 -1
View File
@@ -38,6 +38,6 @@ public:
#ifdef PIN_PWR_EN
digitalWrite(PIN_PWR_EN, LOW);
#endif
sd_power_system_off();
NRF52Board::powerOff();
}
};
-4
View File
@@ -32,8 +32,4 @@ public:
const char* getManufacturerName() const override {
return "Heltec MeshPocket";
}
void powerOff() override {
sd_power_system_off();
}
};
+1 -1
View File
@@ -60,7 +60,7 @@ public:
nrf_gpio_cfg_sense_input(g_ADigitalPinMap[PIN_USER_BTN], NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
#endif
sd_power_system_off();
NRF52Board::powerOff();
}
};
@@ -65,7 +65,7 @@ public:
#ifdef BUTTON_PIN
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(BUTTON_PIN), NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
#endif
sd_power_system_off();
NRF52Board::powerOff();
}
#if defined(P_LORA_TX_LED)
+1 -1
View File
@@ -52,6 +52,6 @@ public:
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(PIN_USER_BTN), NRF_GPIO_PIN_NOPULL,
NRF_GPIO_PIN_SENSE_LOW);
sd_power_system_off();
NRF52Board::powerOff();
}
};
-4
View File
@@ -72,8 +72,4 @@ public:
#endif
return 0;
}
void powerOff() override {
sd_power_system_off();
}
};
@@ -69,6 +69,6 @@ public:
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(BUTTON_PIN), NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
#endif
sd_power_system_off();
NRF52Board::powerOff();
}
};
+1 -1
View File
@@ -88,6 +88,6 @@ public:
nrf_gpio_cfg_sense_input(BUTTON_PIN, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH);
#endif
sd_power_system_off();
NRF52Board::powerOff();
}
};
+1 -2
View File
@@ -40,7 +40,6 @@ public:
#endif
// power off board
sd_power_system_off();
NRF52Board::powerOff();
}
};
+1 -1
View File
@@ -49,6 +49,6 @@ public:
#endif
// power off board
sd_power_system_off();
NRF52Board::powerOff();
}
};
+1 -1
View File
@@ -44,6 +44,6 @@ public:
#endif
// power off board
sd_power_system_off();
NRF52Board::powerOff();
}
};
+1 -1
View File
@@ -35,6 +35,6 @@ public:
}
void powerOff() override {
sd_power_system_off();
NRF52Board::powerOff();
}
};
+1 -1
View File
@@ -50,7 +50,7 @@ public:
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(g_ADigitalPinMap[PIN_USER_BTN]), NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW);
#endif
sd_power_system_off();
NRF52Board::powerOff();
}
};