mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-01-30 21:27:17 +00:00
Fix #193
Changed pin.function so that it's always read-write, which in turn permits InputDevice to force pin.function to "input" rather than checking that it's not "input" first. This ensures internal state in RPi.GPIO and RPIO reflects the reality of each pin's function (see discussion under the ticket for more detail).
This commit is contained in:
@@ -64,9 +64,6 @@ class OutputDeviceBadValue(OutputDeviceError, ValueError):
|
||||
class PinError(GPIOZeroError):
|
||||
"Base class for errors related to pin implementations"
|
||||
|
||||
class PinFixedFunction(PinError, AttributeError):
|
||||
"Error raised when attempting to change the function of a fixed type pin"
|
||||
|
||||
class PinInvalidFunction(PinError, ValueError):
|
||||
"Error raised when attempting to change the function of a pin to an invalid value"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user