Skip to content

Commit

Permalink
Fix for TBeam 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
valentintintin committed Mar 24, 2024
1 parent a45a519 commit 6ae4dd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/power_utils.cpp
Expand Up @@ -237,7 +237,7 @@ namespace POWER_Utils {
PMU.enableDC1();
PMU.setProtectedChannel(XPOWERS_DCDC3);
PMU.disableIRQ(XPOWERS_AXP192_ALL_IRQ);
PMU.enableIRQ(XPOWERS_AXP2101_VBUS_INSERT_IRQ);
PMU.enableIRQ(XPOWERS_AXP192_VBUS_INSERT_IRQ);
PMU.clearIrqStatus();
PMU.setChargingLedMode(XPOWERS_CHG_LED_BLINK_4HZ);
}
Expand Down Expand Up @@ -373,7 +373,7 @@ namespace POWER_Utils {

bool isUsbConnected() {
#if defined(TTGO_T_Beam_V1_0) || defined(TTGO_T_Beam_V1_0_SX1268)
return isCharging();
return PMU.isVbusIn();
#endif
#if defined(TTGO_T_Beam_V1_2) || defined(TTGO_T_Beam_V1_2_SX1262)
return PMU.isVbusIn();
Expand Down

0 comments on commit 6ae4dd0

Please sign in to comment.