From b21516f9ee2a663e68ff6db07c150ee24b73ca7b Mon Sep 17 00:00:00 2001 From: SQFMI Date: Thu, 4 Jul 2024 14:21:04 -0400 Subject: [PATCH] merged fixes for compilation issues --- library.json | 2 +- library.properties | 2 +- src/Display.cpp | 2 ++ src/Watchy.cpp | 3 +-- src/config.h | 19 ++++++++++++------- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/library.json b/library.json index 1de4429..24c321f 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "Watchy", - "version": "1.4.12", + "version": "1.4.13", "description": "Watchy - An Open Source E-Paper Watch by SQFMI", "authors": [ { diff --git a/library.properties b/library.properties index 5fd238c..18abeac 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Watchy -version=1.4.12 +version=1.4.13 author=SQFMI maintainer=SQFMI sentence=Watchy - An Open Source E-Paper Watch by SQFMI diff --git a/src/Display.cpp b/src/Display.cpp index 94cf86d..ecaac83 100644 --- a/src/Display.cpp +++ b/src/Display.cpp @@ -19,9 +19,11 @@ RTC_DATA_ATTR bool displayFullInit = true; void WatchyDisplay::busyCallback(const void *) { + #ifndef ARDUINO_ESP32S3_DEV gpio_wakeup_enable((gpio_num_t)DISPLAY_BUSY, GPIO_INTR_LOW_LEVEL); esp_sleep_enable_gpio_wakeup(); esp_light_sleep_start(); + #endif } WatchyDisplay::WatchyDisplay() : diff --git a/src/Watchy.cpp b/src/Watchy.cpp index 7c60531..893d459 100644 --- a/src/Watchy.cpp +++ b/src/Watchy.cpp @@ -88,7 +88,6 @@ void Watchy::deepSleep() { esp_sleep_enable_ext1_wakeup( BTN_PIN_MASK, ESP_EXT1_WAKEUP_ANY_LOW); // enable deep sleep wake on button press - rtc_clk_32k_enable(true); //rtc_clk_slow_freq_set(RTC_SLOW_FREQ_32K_XTAL); struct tm timeinfo; @@ -109,7 +108,7 @@ void Watchy::deepSleep() { BTN_PIN_MASK, ESP_EXT1_WAKEUP_ANY_HIGH); // enable deep sleep wake on button press #endif - + gpio_deep_sleep_hold_dis(); esp_deep_sleep_start(); } diff --git a/src/config.h b/src/config.h index 46e054f..426bed1 100644 --- a/src/config.h +++ b/src/config.h @@ -2,13 +2,9 @@ #define CONFIG_H // Versioning -#define WATCHY_LIB_VER "1.4.12" +#define WATCHY_LIB_VER "1.4.13" //pins -//#if !defined(ARDUINO_WATCHY_V10) && !defined(ARDUINO_WATCHY_V15) && !defined(ARDUINO_WATCHY_V20) - -//#pragma message "Please install the latest ESP32 Arduino Core (2.0.5+) and choose Watchy as the target board" -//#pragma message "Hardware revision is not defined at the project level, please define in config.h. Defaulting to ARDUINO_WATCHY_V20" #ifdef ARDUINO_ESP32S3_DEV //V3 @@ -42,10 +38,17 @@ #define UP_BTN_MASK (BIT64(0)) #define DOWN_BTN_MASK (BIT64(8)) #define ACC_INT_MASK (BIT64(14)) -#define BTN_PIN_MASK MENU_BTN_MASK|BACK_BTN_MASK|DOWN_BTN_MASK +#define BTN_PIN_MASK MENU_BTN_MASK|BACK_BTN_MASK|UP_BTN_MASK|DOWN_BTN_MASK #else //V1,V1.5,V2 +#if !defined(ARDUINO_WATCHY_V10) && !defined(ARDUINO_WATCHY_V15) && !defined(ARDUINO_WATCHY_V20) + +#pragma message "Please install the latest ESP32 Arduino Core (2.0.5+) and choose Watchy as the target board" +#pragma message "Hardware revision is not defined at the project level, please define in config.h. Defaulting to ARDUINO_WATCHY_V20" + +#define ARDUINO_WATCHY_V20 + #define MENU_BTN_PIN 26 #define BACK_BTN_PIN 25 #define DOWN_BTN_PIN 4 @@ -83,6 +86,8 @@ #endif +#endif + //display #define DISPLAY_WIDTH 200 #define DISPLAY_HEIGHT 200 @@ -112,4 +117,4 @@ #define HARDWARE_VERSION_MAJOR 1 #define HARDWARE_VERSION_MINOR 0 -#endif +#endif \ No newline at end of file