diff --git a/src/TTGO.h b/src/TTGO.h index a9a09e9..15391e6 100644 --- a/src/TTGO.h +++ b/src/TTGO.h @@ -184,6 +184,14 @@ public: initBlacklight(); } +#ifdef LILYGO_WATCH_HAS_BMA423 + void bma423AttachInterrupt(void (*handle)(void)) + { + pinMode(BMA423_INT1, INPUT_PULLUP); + attachInterrupt(BMA423_INT1, handle, RISING); + } +#endif /*LILYGO_WATCH_HAS_BMA423*/ + /****************************************** * TouchPad * ***************************************/ @@ -379,6 +387,13 @@ public: * ***************************************/ #ifdef LILYGO_WATCH_HAS_AXP202 + void powerAttachInterrupt(void (*handle)(void)) + { + pinMode(AXP202_INT, INPUT_PULLUP); + attachInterrupt(AXP202_INT, handle, FALLING); + } + + void trunOnGPS() { #ifdef LILYGO_WATCH_2020_V2