Added axp202&bma423 interrupt registered function

This commit is contained in:
lewisxhe
2020-10-23 21:46:24 +08:00
parent 57c355f4a0
commit 5e23d0b7d7

View File

@@ -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