diff options
Diffstat (limited to 'kvmd/gpio.py')
-rw-r--r-- | kvmd/gpio.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/gpio.py b/kvmd/gpio.py index 64a1a100..ef9d1c5e 100644 --- a/kvmd/gpio.py +++ b/kvmd/gpio.py @@ -43,22 +43,22 @@ def bcm() -> Generator[None, None, None]: def set_output(pin: int, initial: bool=False) -> int: - assert pin > 0, pin + assert pin >= 0, pin GPIO.setup(pin, GPIO.OUT, initial=initial) return pin def set_input(pin: int) -> int: - assert pin > 0, pin + assert pin >= 0, pin GPIO.setup(pin, GPIO.IN) return pin def read(pin: int) -> bool: - assert pin > 0, pin + assert pin >= 0, pin return bool(GPIO.input(pin)) def write(pin: int, flag: bool) -> None: - assert pin > 0, pin + assert pin >= 0, pin GPIO.output(pin, flag) |