From f34ba8f3fb4cbc7ebd27ff6d5610d1110260a62d Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Thu, 30 Mar 2023 15:15:38 +0100 Subject: [PATCH] Remov hard coded pin values for DMX --- wled00/wled.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wled00/wled.cpp b/wled00/wled.cpp index fc2fb129..7451bdd3 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -436,10 +436,10 @@ void WLED::setup() #ifdef WLED_ENABLE_DMX //reserve GPIO2 as hardcoded DMX pin pinManager.allocatePin(2, true, PinOwner::DMX); #endif -#ifdef WLED_ENABLE_DMX_INPUT //reserve GPIO2 and 27 as hardcoded DMX pins - pinManager.allocatePin(2, true, PinOwner::DMX); - pinManager.allocatePin(26, true, PinOwner::DMX); - pinManager.allocatePin(27, true, PinOwner::DMX); +#ifdef WLED_ENABLE_DMX_INPUT + if(dmxTransmitPin > 0) pinManager.allocatePin(dmxTransmitPin, true, PinOwner::DMX); + if(dmxReceivePin > 0) pinManager.allocatePin(dmxReceivePin, true, PinOwner::DMX); + if(dmxEnablePin > 0) pinManager.allocatePin(dmxEnablePin, true, PinOwner::DMX); #endif // WLEDMM experimental: support for single neoPixel on Adafruit boards