Update boars.cpp

This commit is contained in:
lewisxhe 2024-12-04 11:23:38 +08:00
commit be0ac0f1db
47 changed files with 470 additions and 0 deletions

View file

@ -333,9 +333,19 @@ void disablePeripherals()
#ifdef HAS_PMU
if (!PMU)return;
PMU->setChargingLedMode(XPOWERS_CHG_LED_OFF);
// Disable the PMU measurement section
PMU->disableSystemVoltageMeasure();
PMU->disableVbusVoltageMeasure();
PMU->disableBattVoltageMeasure();
PMU->disableTemperatureMeasure();
PMU->disableBattDetection();
// Disable all PMU interrupts
PMU->disableIRQ(XPOWERS_AXP2101_ALL_IRQ);
// Clear the PMU interrupt status before sleeping, otherwise the sleep current will increase
PMU->clearIrqStatus();
#if defined(T_BEAM_S3_BPF)
PMU->disablePowerOutput(XPOWERS_ALDO4); //gps
PMU->disablePowerOutput(XPOWERS_ALDO2); //Sdcard

View file

@ -333,9 +333,19 @@ void disablePeripherals()
#ifdef HAS_PMU
if (!PMU)return;
PMU->setChargingLedMode(XPOWERS_CHG_LED_OFF);
// Disable the PMU measurement section
PMU->disableSystemVoltageMeasure();
PMU->disableVbusVoltageMeasure();
PMU->disableBattVoltageMeasure();
PMU->disableTemperatureMeasure();
PMU->disableBattDetection();
// Disable all PMU interrupts
PMU->disableIRQ(XPOWERS_AXP2101_ALL_IRQ);
// Clear the PMU interrupt status before sleeping, otherwise the sleep current will increase
PMU->clearIrqStatus();
#if defined(T_BEAM_S3_BPF)
PMU->disablePowerOutput(XPOWERS_ALDO4); //gps
PMU->disablePowerOutput(XPOWERS_ALDO2); //Sdcard