diff options
Diffstat (limited to 'kvmd/plugins/ugpio/gpio.py')
-rw-r--r-- | kvmd/plugins/ugpio/gpio.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kvmd/plugins/ugpio/gpio.py b/kvmd/plugins/ugpio/gpio.py index 96c3eee7..90426e13 100644 --- a/kvmd/plugins/ugpio/gpio.py +++ b/kvmd/plugins/ugpio/gpio.py @@ -83,6 +83,11 @@ class Plugin(BaseUserGpioDriver): assert self.__reader await self.__reader.poll() + def cleanup(self) -> None: + for (pin, initial) in self.__output_pins.items(): + if initial is not None: + gpio.write(pin, initial) + def read(self, pin: int) -> bool: return gpio.read(pin) |