From 50cf57affbe75ff603a3cf2d87146f669b10cd9d Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Fri, 24 Jul 2020 10:41:34 +0200 Subject: [PATCH] ESP8266 Disable Pin Initialization on Boot to fix pin toggling (#1185) --- esphome/core/esphal.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/esphome/core/esphal.cpp b/esphome/core/esphal.cpp index 90707016c3..30a1e9c49f 100644 --- a/esphome/core/esphal.cpp +++ b/esphome/core/esphal.cpp @@ -304,3 +304,14 @@ void *memchr(const void *s, int c, size_t n) { } }; #endif + +#ifdef ARDUINO_ARCH_ESP8266 +extern "C" { +extern void resetPins() { // NOLINT + // Added in framework 2.7.0 + // usually this sets up all pins to be in INPUT mode + // however, not strictly needed as we set up the pins properly + // ourselves and this causes pins to toggle during reboot. +} +} +#endif