Skip to content

Commit b49dbd0

Browse files
committed
exporter: add new invert (active-low) attribute to GPIOSysFSExport
Signed-off-by: Perry Melange <[email protected]>
1 parent c805633 commit b49dbd0

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+
"invert": self.local.invert,
645646
}
646647

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

652654
def _start(self, start_params):
653655
"""Start a GPIO export to userspace"""
654656
index = start_params["index"]
657+
invert = start_params["invert"]
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)