diff options
author | Devaev Maxim <[email protected]> | 2020-09-14 01:34:15 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-09-14 01:34:23 +0300 |
commit | ee10435b818e0bf8ebf749a209969166502d78d4 (patch) | |
tree | 02db1948ed4a956d0cd2f6c5fd0b12d03804d3b2 /kvmd/plugins/atx | |
parent | 91eb257f3df32487d00ca457f9d78eabd354ce54 (diff) |
common gpio path variable
Diffstat (limited to 'kvmd/plugins/atx')
-rw-r--r-- | kvmd/plugins/atx/gpio.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/plugins/atx/gpio.py b/kvmd/plugins/atx/gpio.py index 5ca611ef..851e4ab4 100644 --- a/kvmd/plugins/atx/gpio.py +++ b/kvmd/plugins/atx/gpio.py @@ -73,7 +73,7 @@ class Plugin(BaseAtx): # pylint: disable=too-many-instance-attributes self.__reset_switch_line: Optional[gpiod.Line] = None self.__reader = aiogp.AioPinsReader( - path="/dev/gpiochip0", + path=aiogp.DEVICE_PATH, consumer="kvmd/atx-gpio/leds", pins={ power_led_pin: power_led_inverted, @@ -101,7 +101,7 @@ class Plugin(BaseAtx): # pylint: disable=too-many-instance-attributes assert self.__power_switch_line is None assert self.__reset_switch_line is None - self.__chip = gpiod.Chip("/dev/gpiochip0") + self.__chip = gpiod.Chip(aiogp.DEVICE_PATH) self.__power_switch_line = self.__chip.get_line(self.__power_switch_pin) self.__power_switch_line.request("kvmd/atx-gpio/power_switch", gpiod.LINE_REQ_DIR_OUT, default_val=0) |