]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/micropython.py
Update requirements for latest version of PureIO
[Adafruit_Blinka-hackapet.git] / src / micropython.py
old mode 100644 (file)
new mode 100755 (executable)
index 7aaaca6..5f369e3
@@ -1,3 +1,26 @@
-class const:
-    def __new__(self, x):
-        return x
+"""
+`micropython` - MicroPython Specific Decorator Functions
+=================================================
+
+* Author(s): cefn
+"""
+
+
+def const(x):
+    "Emulate making a constant"
+    return x
+
+
+def native(f):
+    "Emulate making a native"
+    return f
+
+
+def viper(f):
+    "User is attempting to use a viper code emitter"
+    raise SyntaxError("invalid micropython decorator")
+
+
+def asm_thumb(f):
+    "User is attempting to use an inline assembler"
+    raise SyntaxError("invalid micropython decorator")