diff options
author | Devaev Maxim <[email protected]> | 2020-11-03 10:15:54 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-11-11 22:24:25 +0300 |
commit | e07cdd60f393eb17184afe4ea1730f3c5745ea6f (patch) | |
tree | 5751136b75af6dc2433c19e17b9e3739cb7a9d33 /kvmd/aiogp.py | |
parent | a3707d047fddd5f0c923422468be29ddb345f989 (diff) |
spi firmware
Diffstat (limited to 'kvmd/aiogp.py')
-rw-r--r-- | kvmd/aiogp.py | 6 |
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) |