printipi icon indicating copy to clipboard operation
printipi copied to clipboard

Warn whenever two IoPins refer to the same physical pin

Open Wallacoloo opened this issue 10 years ago • 0 comments

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.

Wallacoloo avatar Jan 10 '15 21:01 Wallacoloo