mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-16 23:07:34 +00:00
Add interrupt for external charge detection
Tested on Thinknode m4, m6, and T1000-e
This commit is contained in:
@@ -723,6 +723,16 @@ bool Power::setup()
|
||||
runASAP = true;
|
||||
},
|
||||
CHANGE);
|
||||
#endif
|
||||
#ifdef EXT_CHRG_DETECT
|
||||
attachInterrupt(
|
||||
EXT_CHRG_DETECT,
|
||||
[]() {
|
||||
power->setIntervalFromNow(0);
|
||||
runASAP = true;
|
||||
BaseType_t higherWake = 0;
|
||||
},
|
||||
CHANGE);
|
||||
#endif
|
||||
enabled = found;
|
||||
low_voltage_counter = 0;
|
||||
|
||||
Reference in New Issue
Block a user