summaryrefslogtreecommitdiff
path: root/kvmd/aiogp.py
diff options
context:
space:
mode:
Diffstat (limited to 'kvmd/aiogp.py')
-rw-r--r--kvmd/aiogp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/kvmd/aiogp.py b/kvmd/aiogp.py
index 100bcd4c..2f988e67 100644
--- a/kvmd/aiogp.py
+++ b/kvmd/aiogp.py
@@ -20,6 +20,7 @@
# ========================================================================== #
+import os
import asyncio
import threading
@@ -32,6 +33,12 @@ from . import aiotools
# =====
+# XXX: Do not use this variable for any purpose other than testing.
+# It can be removed at any time.
+DEVICE_PATH = os.getenv("KVMD_GPIO_DEVICE_PATH", "/dev/gpiochip0")
+
+
+# =====
async def pulse(line: gpiod.Line, delay: float, final: float) -> None:
try:
line.set_value(1)