From 00d6f99cf1f94babb237bff00364497ec30f475c Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Fri, 18 Nov 2016 07:20:26 +0300
Subject: [PATCH] examples/hwapi: Add hwconfig for console tracing of LED
 operations.

---
 examples/hwapi/hwconfig_console.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 examples/hwapi/hwconfig_console.py

diff --git a/examples/hwapi/hwconfig_console.py b/examples/hwapi/hwconfig_console.py
new file mode 100644
index 000000000..7355571a1
--- /dev/null
+++ b/examples/hwapi/hwconfig_console.py
@@ -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)
-- 
GitLab