examples/hwapi: Add hwconfig for console tracing of LED operations.
This commit is contained in:
parent
e81a5353cb
commit
00d6f99cf1
|
@ -0,0 +1,13 @@
|
||||||
|
# This is hwconfig for "emulation" for cases when there's no real hardware.
|
||||||
|
# It just prints information to console.
|
||||||
|
class LEDClass:
|
||||||
|
|
||||||
|
def __init__(self, id):
|
||||||
|
self.id = id
|
||||||
|
|
||||||
|
def value(self, v):
|
||||||
|
print("LED(%d):" % self.id, v)
|
||||||
|
|
||||||
|
|
||||||
|
LED = LEDClass(1)
|
||||||
|
LED2 = LEDClass(12)
|
Loading…
Reference in New Issue