async gpio plugins

This commit is contained in:
Devaev Maxim
2021-04-09 05:57:04 +03:00
parent 6cc161427a
commit 6f60118320
6 changed files with 23 additions and 23 deletions

View File

@@ -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: