pin info: show conflicts

* set.cpp: reject non-ADC pins as analog button pins (bugfix)
* pinmanager:
record conflicts
added getOwnerText(PinOwner tag) and getPinConflicts(int gpio)

GPIO    | Assigned to           | Info
--------|-----------------------|------------
i/o   0   Button            !! Conflict with AudioReactive (UM) !!        (default) I2S MCLK
i/o   1   debug output            Serial TX
i/o   2   ./.                     (default) LED pin
i/o   3   ./.                     Serial RX
i/o   5   ./.                     (default) SPI SS
i/o  13   Button            !! Conflict with IR Receiver !!

PIN ALLOC error: GPIO19 for analog button #2 is not an analog pin!
This commit is contained in:
Frank
2022-12-04 02:22:50 +01:00
parent 4bafc222f9
commit d2d8a86d81
5 changed files with 51 additions and 18 deletions

View File

@@ -480,10 +480,11 @@ void WLED::setup()
if(pinManager.isPinOk(pinNr, false)) {
if ((!pinManager.isPinAllocated(pinNr)) && (pinManager.getPinSpecialText(pinNr).length() == 0)) continue; // comment out to include no-name,unused GPIO pins
bool is_inOut = pinManager.isPinOk(pinNr, true);
Serial.printf("%s %2d\t %-18s\t %s\n",
Serial.printf("%s %2d\t %-17s %s\t %s\n",
(is_inOut?"i/o":"in "),
pinNr,
pinManager.getPinOwnerText(pinNr).c_str(),
pinManager.getPinOwnerText(pinNr).c_str(),
pinManager.getPinConflicts(pinNr).c_str(),
pinManager.getPinSpecialText(pinNr).c_str()
);
}