summaryrefslogtreecommitdiff
path: root/examples/hwapi/hwconfig_console.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hwapi/hwconfig_console.py')
-rw-r--r--examples/hwapi/hwconfig_console.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/hwapi/hwconfig_console.py b/examples/hwapi/hwconfig_console.py
index 4b0b0d79b..bbcc0e816 100644
--- a/examples/hwapi/hwconfig_console.py
+++ b/examples/hwapi/hwconfig_console.py
@@ -8,6 +8,12 @@ class LEDClass:
def value(self, v):
print(self.id, v)
+ def on(self):
+ self.value(1)
+
+ def off(self):
+ self.value(0)
+
LED = LEDClass(1)
LED2 = LEDClass(12)