summaryrefslogtreecommitdiff
path: root/kvmd/aiogp.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-11-03 10:15:54 +0300
committerDevaev Maxim <[email protected]>2020-11-11 22:24:25 +0300
commite07cdd60f393eb17184afe4ea1730f3c5745ea6f (patch)
tree5751136b75af6dc2433c19e17b9e3739cb7a9d33 /kvmd/aiogp.py
parenta3707d047fddd5f0c923422468be29ddb345f989 (diff)
spi firmware
Diffstat (limited to 'kvmd/aiogp.py')
-rw-r--r--kvmd/aiogp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/aiogp.py b/kvmd/aiogp.py
index ba406e8d..46252914 100644
--- a/kvmd/aiogp.py
+++ b/kvmd/aiogp.py
@@ -34,12 +34,12 @@ from . import aiotools
# =====
-async def pulse(line: gpiod.Line, delay: float, final: float) -> None:
+async def pulse(line: gpiod.Line, delay: float, final: float, inverted: bool=False) -> None:
try:
- line.set_value(1)
+ line.set_value(int(not inverted))
await asyncio.sleep(delay)
finally:
- line.set_value(0)
+ line.set_value(int(inverted))
await asyncio.sleep(final)