mirror of
https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library.git
synced 2026-02-20 01:21:25 +01:00
Added axp202&bma423 interrupt registered function
This commit is contained in:
15
src/TTGO.h
15
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
|
||||
|
||||
Reference in New Issue
Block a user