Skip to content

Commit dd6d9a1

Browse files
committed
examples/sysfsgpio: add invert (active-low) attribute to examples
Add the new invert (active-low) attribute to the examples and add calls to the new invert method Signed-off-by: Perry Melange <[email protected]>
1 parent 7c210f6 commit dd6d9a1

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

examples/sysfsgpio/export-gpio.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
desk:
2-
GpioDigitalOutputDriver:
2+
SysfsGPIO:
33
index: 60
4+
invert: False

examples/sysfsgpio/import-gpio.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ targets:
55
name: gpio
66
drivers:
77
GpioDigitalOutputDriver: {}
8-
options:
9-
coordinator_address: 'labgrid:20408'

examples/sysfsgpio/sysfsgpio.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
StepLogger.start()
1414

1515
t = Target("main")
16-
r = SysfsGPIO(t, name=None, index=60)
16+
r = SysfsGPIO(t, name=None, index=60, invert=True)
1717
d = GpioDigitalOutputDriver(t, name=None)
1818

1919
p = t.get_driver("DigitalOutputProtocol")
2020
print(t.resources)
21+
print("Testing IO")
2122
p.set(True)
2223
print(p.get())
2324
time.sleep(2)

examples/sysfsgpio/sysfsgpio_remote.py

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
p = t.get_driver("DigitalOutputProtocol")
1717
print(t.resources)
18+
print("Testing IO")
1819
p.set(True)
1920
print(p.get())
2021
time.sleep(2)

0 commit comments

Comments
 (0)