]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Moved Pin definition back so that __module__ properly rendered by repr(). Fear of...
authorCefn Hoile <github.com@cefn.com>
Mon, 19 Feb 2018 20:41:17 +0000 (20:41 +0000)
committerCefn Hoile <github.com@cefn.com>
Mon, 19 Feb 2018 20:41:17 +0000 (20:41 +0000)
python/mcp/__init__.py
python/microcontroller/__init__.py

index 799f33695e8156eff517de931894db3ca79a5cab..2ee42c22601ca91c6d0b6c24ecb6fe9fecfef95a 100644 (file)
@@ -30,8 +30,3 @@ class Enum(object):
                 yield (key, val)
 
 
                 yield (key, val)
 
 
-class Pin(Enum):
-    def __init__(self, id):
-        """ id type is likely platform-specific"""
-        self.id = id
-    pass
index c76a6559561ca2c9c65fc8c67ef757640b50be0d..9d25685fd023f4ce8b4710494f08b3ab75e5108a 100644 (file)
@@ -1,4 +1,11 @@
 import agnostic
 import agnostic
+from mcp import Enum
+
+class Pin(Enum):
+    def __init__(self, id):
+        """Identifier for pin, referencing platform-specific pin id"""
+        self.id = id
+    pass
 
 if agnostic.microcontroller == "esp8266":
     from microcontroller.esp8266 import pin
 
 if agnostic.microcontroller == "esp8266":
     from microcontroller.esp8266 import pin