Skip to content

Commit

Permalink
Improve Pin Manager Debugging (Aircoookie#2532)
Browse files Browse the repository at this point in the history
  • Loading branch information
bole5 authored Feb 7, 2022
1 parent 97f8eea commit 7ee1472
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion wled00/pin_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ bool PinManagerClass::allocateMultiplePins(const managed_pin_type * mptArray, by
byte bi = gpio - 8*by;
bitWrite(pinAlloc[by], bi, true);
ownerTag[gpio] = tag;
#ifdef WLED_DEBUG
DEBUG_PRINT(F("PIN ALLOC: Pin "));
DEBUG_PRINT(gpio);
DEBUG_PRINT(F(" allocated by "));
DebugPrintOwnerTag(tag);
DEBUG_PRINTLN(F(""));
#endif
}
return true;
}
Expand All @@ -155,7 +162,14 @@ bool PinManagerClass::allocatePin(byte gpio, bool output, PinOwner tag)
byte bi = gpio - 8*by;
bitWrite(pinAlloc[by], bi, true);
ownerTag[gpio] = tag;

#ifdef WLED_DEBUG
DEBUG_PRINT(F("PIN ALLOC: Pin "));
DEBUG_PRINT(gpio);
DEBUG_PRINT(F(" allocated by "));
DebugPrintOwnerTag(tag);
DEBUG_PRINTLN(F(""));
#endif

return true;
}

Expand Down

0 comments on commit 7ee1472

Please sign in to comment.