From ed625e2bb3d0597809dea07854c756d285649461 Mon Sep 17 00:00:00 2001 From: Andre K Date: Mon, 11 Mar 2024 12:34:41 -0300 Subject: [PATCH 1/2] refactor: add delay for T-Echo peripherals setup --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index ef1cd53c36..b33c8e5d14 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -224,6 +224,7 @@ void setup() pinMode(PIN_POWER_EN, OUTPUT); digitalWrite(PIN_POWER_EN, HIGH); digitalWrite(PIN_POWER_EN1, INPUT); + delay(200); #endif #if defined(VEXT_ENABLE_V03) @@ -960,4 +961,4 @@ void loop() mainDelay.delay(delayMsec); } // if (didWake) LOG_DEBUG("wake!\n"); -} \ No newline at end of file +} From 8303a41fd90508d008e01e07ca7b2fefa6e48f84 Mon Sep 17 00:00:00 2001 From: andrekir Date: Thu, 14 Mar 2024 07:32:36 -0300 Subject: [PATCH 2/2] comment out `PIN_POWER_EN1` --- src/main.cpp | 3 +-- src/sleep.cpp | 2 +- variants/t-echo/variant.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 61090d08dc..fe5d455f8a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -223,8 +223,7 @@ void setup() #if defined(TTGO_T_ECHO) && defined(PIN_POWER_EN) pinMode(PIN_POWER_EN, OUTPUT); digitalWrite(PIN_POWER_EN, HIGH); - digitalWrite(PIN_POWER_EN1, INPUT); - delay(200); + // digitalWrite(PIN_POWER_EN1, INPUT); #endif #if defined(LORA_TCXO_GPIO) diff --git a/src/sleep.cpp b/src/sleep.cpp index bfacffeb9a..6d8e4f3cc3 100644 --- a/src/sleep.cpp +++ b/src/sleep.cpp @@ -203,7 +203,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false) #ifdef TTGO_T_ECHO #ifdef PIN_POWER_EN pinMode(PIN_POWER_EN, INPUT); // power off peripherals - pinMode(PIN_POWER_EN1, INPUT_PULLDOWN); + // pinMode(PIN_POWER_EN1, INPUT_PULLDOWN); #endif #endif diff --git a/variants/t-echo/variant.h b/variants/t-echo/variant.h index 19a66719f2..13f74d3034 100644 --- a/variants/t-echo/variant.h +++ b/variants/t-echo/variant.h @@ -158,7 +158,7 @@ External serial flash WP25R1635FZUIL0 // Controls power for all peripherals (eink + GPS + LoRa + Sensor) #define PIN_POWER_EN (0 + 12) -#define PIN_POWER_EN1 (0 + 13) +// #define PIN_POWER_EN1 (0 + 13) #define USE_EINK