pin info: conflicts include input-only
record conflict if pin was requested as in/out but pin is input-only
This commit is contained in:
@@ -298,6 +298,9 @@ bool PinManagerClass::allocateMultiplePins(const managed_pin_type * mptArray, by
|
|||||||
DEBUG_PRINT(" as "); DEBUG_PRINT(mptArray[i].isOutput ? "output": "input"); // WLEDMM
|
DEBUG_PRINT(" as "); DEBUG_PRINT(mptArray[i].isOutput ? "output": "input"); // WLEDMM
|
||||||
DEBUG_PRINTLN(F(""));
|
DEBUG_PRINTLN(F(""));
|
||||||
#endif
|
#endif
|
||||||
|
if ((gpio < 50) && (gpio >= 0) && (tag != PinOwner::None)) {
|
||||||
|
ownerConflict[gpio] = tag; // WLEDMM record conflict
|
||||||
|
}
|
||||||
shouldFail = true;
|
shouldFail = true;
|
||||||
}
|
}
|
||||||
if ((tag==PinOwner::HW_I2C || tag==PinOwner::HW_SPI) && isPinAllocated(gpio, tag)) {
|
if ((tag==PinOwner::HW_I2C || tag==PinOwner::HW_SPI) && isPinAllocated(gpio, tag)) {
|
||||||
@@ -353,6 +356,9 @@ bool PinManagerClass::allocatePin(byte gpio, bool output, PinOwner tag)
|
|||||||
#ifdef WLED_DEBUG
|
#ifdef WLED_DEBUG
|
||||||
if (gpio < 255) { // 255 (-1) is the "not defined GPIO"
|
if (gpio < 255) { // 255 (-1) is the "not defined GPIO"
|
||||||
if (!isPinOk(gpio, output)) {
|
if (!isPinOk(gpio, output)) {
|
||||||
|
if ((gpio < 50) && (gpio >= 0) && (tag != PinOwner::None)) {
|
||||||
|
ownerConflict[gpio] = tag; // WLEDMM record conflict
|
||||||
|
}
|
||||||
DEBUG_PRINT(F("PIN ALLOC: FAIL for owner "));
|
DEBUG_PRINT(F("PIN ALLOC: FAIL for owner "));
|
||||||
DebugPrintOwnerTag(tag);
|
DebugPrintOwnerTag(tag);
|
||||||
DEBUG_PRINT(F(": GPIO ")); DEBUG_PRINT(gpio);
|
DEBUG_PRINT(F(": GPIO ")); DEBUG_PRINT(gpio);
|
||||||
|
|||||||
Reference in New Issue
Block a user