Skip to content

Commit 00d6f99

Browse files
committed
examples/hwapi: Add hwconfig for console tracing of LED operations.
1 parent e81a535 commit 00d6f99

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

examples/hwapi/hwconfig_console.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is hwconfig for "emulation" for cases when there's no real hardware.
2+
# It just prints information to console.
3+
class LEDClass:
4+
5+
def __init__(self, id):
6+
self.id = id
7+
8+
def value(self, v):
9+
print("LED(%d):" % self.id, v)
10+
11+
12+
LED = LEDClass(1)
13+
LED2 = LEDClass(12)

0 commit comments

Comments
 (0)