mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 11:01:53 +08:00
refactoring
This commit is contained in:
@@ -147,7 +147,7 @@ class _SpiPhy(BasePhy): # pylint: disable=too-many-instance-attributes
|
||||
if self.__sw_cs_pin > 0:
|
||||
with contextlib.closing(gpiod.Chip(env.GPIO_DEVICE_PATH)) as chip:
|
||||
line = chip.get_line(self.__sw_cs_pin)
|
||||
line.request("kvmd::hid-mcu::sw_cs", gpiod.LINE_REQ_DIR_OUT, default_vals=[1])
|
||||
line.request("kvmd::hid::sw_cs", gpiod.LINE_REQ_DIR_OUT, default_vals=[1])
|
||||
yield line
|
||||
else:
|
||||
yield None
|
||||
|
||||
Reference in New Issue
Block a user