Improve Pin Manager Debugging (#2532)
This commit is contained in:
parent
97f8eea302
commit
7ee14724fc
@ -132,6 +132,13 @@ bool PinManagerClass::allocateMultiplePins(const managed_pin_type * mptArray, by
|
|||||||
byte bi = gpio - 8*by;
|
byte bi = gpio - 8*by;
|
||||||
bitWrite(pinAlloc[by], bi, true);
|
bitWrite(pinAlloc[by], bi, true);
|
||||||
ownerTag[gpio] = tag;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
@ -155,7 +162,14 @@ bool PinManagerClass::allocatePin(byte gpio, bool output, PinOwner tag)
|
|||||||
byte bi = gpio - 8*by;
|
byte bi = gpio - 8*by;
|
||||||
bitWrite(pinAlloc[by], bi, true);
|
bitWrite(pinAlloc[by], bi, true);
|
||||||
ownerTag[gpio] = tag;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user