Skip to content

Commit a8eaa23

Browse files
committed
exporter: add new active_low attribute to GPIOSysFSExport
Signed-off-by: Perry Melange <[email protected]>
1 parent ee3c736 commit a8eaa23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

labgrid/remote/exporter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,16 +642,19 @@ def _get_params(self):
642642
return {
643643
"host": self.host,
644644
"index": self.local.index,
645+
"active_low": self.local.active_low,
645646
}
646647

647648
def _get_start_params(self):
648649
return {
649650
"index": self.local.index,
651+
"active_low": self.local.active_low,
650652
}
651653

652654
def _start(self, start_params):
653655
"""Start a GPIO export to userspace"""
654656
index = start_params["index"]
657+
active_low = start_params["active_low"]
655658

656659
if self.export_path.exists():
657660
self.system_exported = True
@@ -672,7 +675,6 @@ def _stop(self, start_params):
672675
with open(export_sysfs_path, mode="wb") as unexport:
673676
unexport.write(str(index).encode("utf-8"))
674677

675-
676678
exports["SysfsGPIO"] = GPIOSysFSExport
677679
exports["MatchedSysfsGPIO"] = GPIOSysFSExport
678680

0 commit comments

Comments
 (0)