mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
async gpio plugins
This commit is contained in:
@@ -113,13 +113,13 @@ class Plugin(BaseUserGpioDriver):
|
||||
self.__close_device()
|
||||
self.__stop = True
|
||||
|
||||
def read(self, pin: int) -> bool:
|
||||
async def read(self, pin: int) -> bool:
|
||||
try:
|
||||
return self.__inner_read(pin)
|
||||
except Exception:
|
||||
raise GpioDriverOfflineError(self)
|
||||
|
||||
def write(self, pin: int, state: bool) -> None:
|
||||
async def write(self, pin: int, state: bool) -> None:
|
||||
try:
|
||||
return self.__inner_write(pin, state)
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user