From 59686a80acfcb6fcd19ef5ae4a03f887a5953453 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Thu, 8 Sep 2022 18:37:54 +0300 Subject: [PATCH] debug: revert forced gpio lock ref. 8ceeebdb24aa9bd863fa28676a0364497ec193ae does not really do much, just causes yet another 'why does this driver ignores pin 1 or 3' question by anyone trying to use buttons or relays since we configure pins on per-driver basis and dont have global 'roles' assigned to each pin, it is pretty tricky to understand every other dependency coming in at setup() time. right now, first one wins. a bit more complex pre-setup() dependency resolution could also work, and some concept that we depend on uart as peripheral and not just some pins --- code/espurna/debug.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/code/espurna/debug.cpp b/code/espurna/debug.cpp index 09403b92..f7e5db13 100644 --- a/code/espurna/debug.cpp +++ b/code/espurna/debug.cpp @@ -582,21 +582,6 @@ void configure() { DEBUG_PORT.setDebugOutput(settings::sdkDebug()); } - // Make sure other modules are aware of used GPIOs - // TODO: external port config, without using Arduino globals, will fix this diagnostics mess... -#if DEBUG_SERIAL_SUPPORT -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wpragmas" -#pragma GCC diagnostic ignored "-Wtautological-compare" - if (&(DEBUG_PORT) == &Serial) { - gpioLock(1); - gpioLock(3); - } else if (&(DEBUG_PORT) == &Serial1) { - gpioLock(2); - } -#pragma GCC diagnostic pop -#endif - #if DEBUG_LOG_BUFFER_SUPPORT if (settings::buffer()) { debug::buffer::enable(settings::bufferSize());