mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
common gpio path variable
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user