summaryrefslogtreecommitdiff
path: root/kvmd/plugins/ugpio/gpio.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-14 01:34:15 +0300
committerDevaev Maxim <[email protected]>2020-09-14 01:34:23 +0300
commitee10435b818e0bf8ebf749a209969166502d78d4 (patch)
tree02db1948ed4a956d0cd2f6c5fd0b12d03804d3b2 /kvmd/plugins/ugpio/gpio.py
parent91eb257f3df32487d00ca457f9d78eabd354ce54 (diff)
common gpio path variable
Diffstat (limited to 'kvmd/plugins/ugpio/gpio.py')
-rw-r--r--kvmd/plugins/ugpio/gpio.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/plugins/ugpio/gpio.py b/kvmd/plugins/ugpio/gpio.py
index aa43caf1..16e0b516 100644
--- a/kvmd/plugins/ugpio/gpio.py
+++ b/kvmd/plugins/ugpio/gpio.py
@@ -59,13 +59,13 @@ class Plugin(BaseUserGpioDriver):
def prepare(self) -> None:
assert self.__reader is None
self.__reader = aiogp.AioPinsReader(
- path="/dev/gpiochip0",
+ path=aiogp.DEVICE_PATH,
consumer="kvmd/ugpio-gpio/inputs",
pins=dict.fromkeys(self.__input_pins, False),
notifier=self._notifier,
)
- self.__chip = gpiod.Chip("/dev/gpiochip0")
+ self.__chip = gpiod.Chip(aiogp.DEVICE_PATH)
for (pin, initial) in self.__output_pins.items():
line = self.__chip.get_line(pin)
line.request("kvmd/ugpio-gpio/outputs", gpiod.LINE_REQ_DIR_OUT, default_val=int(initial or False))