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.
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.