diff --git a/src/Power.cpp b/src/Power.cpp index 97bacafd2..49e95bd0c 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -1000,6 +1000,17 @@ int32_t Power::runOnce() powerFSM.trigger(EVENT_POWER_CONNECTED); } +#ifdef T_WATCH_S3 + /* + In the T-Watch S3 this code fragment reacts to the short press of the button by switching the + display on and off + */ + if (PMU->isPekeyShortPressIrq()) { + LOG_INFO("Input: Corona Button Click"); + InputEvent event = {.inputEvent = (input_broker_event)INPUT_BROKER_CANCEL, .kbchar = 0, .touchX = 0, .touchY = 0}; + inputBroker->injectInputEvent(&event); + } +#endif /* Other things we could check if we cared... diff --git a/variants/esp32s3/t-watch-s3/variant.h b/variants/esp32s3/t-watch-s3/variant.h index 507d6b7dc..aca491a6d 100644 --- a/variants/esp32s3/t-watch-s3/variant.h +++ b/variants/esp32s3/t-watch-s3/variant.h @@ -60,6 +60,8 @@ #define BUTTON_PIN 0 // only for Plus version +#define PMU_IRQ 21 // Interrupt pin for the PMU + #define USE_SX1262 #define USE_SX1268