]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - python/board/__init__.py
Fail hard when board cannot be determined. Feather Huzzah Red LED is inverted. Typo...
[Adafruit_Blinka-hackapet.git] / python / board / __init__.py
index c5397251079a39fae2ee6d0f0bae64e35d69aae9..b5d65c7fb960621a6cf4048fe93a4ae572fd22d1 100644 (file)
@@ -29,11 +29,19 @@ platform introspection
 """
 
 import sys
+from agnostic import board
 
 __version__ = "0.0.0-auto.0"
 __repo__ = "https://github.com/adafruit/Adafruit_Micropython_Blinka.git"
 
-if sys.platform == "esp8266":
-    from boards.esp8266 import *
-elif sys.platform == "pyboard":
-    from boards.pyboard import *
+
+if board == "feather_huzzah":
+    from board.feather_huzzah import *
+elif board == "feather_m0_express":
+    from board.feather_m0_express import *
+elif board == "nodemcu":
+    from board.nodemcu import *
+elif board == "pyboard":
+    from board.pyboard import *
+else:
+    raise NotImplementedError("Board not supported")
\ No newline at end of file