fix(boards): Remove redundant AXP2101 charging configuration for Waveshare ESP32-C6-Touch-AMOLED-2.16

- These settings were causing conflicts with the on-chip fuel gauge reference configuration
- Simplify power initialization by relying on BSP defaults instead of overriding them
This commit is contained in:
Alexander Wennerstrøm
2026-05-24 09:48:35 +02:00
parent 9f75de55a2
commit f5f43aa8aa
@@ -33,10 +33,6 @@ void power_hal_init(void) {
// Mirror the Waveshare XiaoZhi BSP charging config so the on-chip // Mirror the Waveshare XiaoZhi BSP charging config so the on-chip
// fuel gauge has the right reference numbers. Without these, // fuel gauge has the right reference numbers. Without these,
// getBatteryPercent() returns -1 / shows "---" on the UI. // getBatteryPercent() returns -1 / shows "---" on the UI.
pmu.setChargeTargetVoltage(XPOWERS_AXP2101_CHG_VOL_4V1);
pmu.setChargerConstantCurr(XPOWERS_AXP2101_CHG_CUR_400MA);
pmu.setChargerTerminationCurr(XPOWERS_AXP2101_CHG_ITERM_25MA);
pmu.setPrechargeCurr(XPOWERS_AXP2101_PRECHARGE_50MA);
pmu.disableIRQ(XPOWERS_AXP2101_ALL_IRQ); pmu.disableIRQ(XPOWERS_AXP2101_ALL_IRQ);
pmu.clearIrqStatus(); pmu.clearIrqStatus();
@@ -48,7 +44,7 @@ void power_hal_init(void) {
} }
void power_hal_tick(void) { void power_hal_tick(void) {
uint32_t now = millis(); uint32_t now = millis();
if (now - last_charging_ms >= CHARGING_POLL_MS) { if (now - last_charging_ms >= CHARGING_POLL_MS) {
last_charging_ms = now; last_charging_ms = now;