get ttgo building again

This commit is contained in:
geeksville
2020-02-08 07:55:12 -08:00
parent 493d7e33c6
commit 0158fcf352
4 changed files with 39 additions and 39 deletions

View File

@@ -390,6 +390,27 @@ void loop()
{
// blink the axp led
axp.setChgLEDMode(ledon ? AXP20X_LED_LOW_LEVEL : AXP20X_LED_OFF);
if (pmu_irq)
{
pmu_irq = false;
axp.readIRQ();
if (axp.isChargingIRQ())
{
baChStatus = "Charging";
}
else
{
baChStatus = "No Charging";
}
if (axp.isVbusRemoveIRQ())
{
baChStatus = "No Charging";
}
// This is not a GPIO actually connected on the tbeam board
// digitalWrite(2, !digitalRead(2));
axp.clearIRQ();
}
}
#endif