printipi
printipi copied to clipboard
Warn whenever two IoPins refer to the same physical pin
Right now, if I had two different pieces of code that make use of the same gpio pin on the device, they can easily interfere with eachother; one expects the pin to be in read mode while the other expects it to be in write mode.
Luckily, when a pin is instantiated, we can search the list of living pins to see if another IoPin uses the same PrimitiveIoPin.id()
value, in which case we can warn the user of this undefined behavior.