"""
`board` - Define ids for available pins
=================================================
-Conditionally imports and re-exports a submodule, such as boards.esp8266 based on
-platform introspection
+
+See `CircuitPython:board` in CircuitPython for more details.
* Author(s): cefn
"""
+import sys
-import gc
+from adafruit_blinka.agnostic import board_id, detector
+import adafruit_platformdetect.board as ap_board
-gc.collect()
-from adafruit_blinka.agnostic import board
-gc.collect()
+# pylint: disable=wildcard-import,unused-wildcard-import,ungrouped-imports
-__version__ = "0.0.0-auto.0"
-__repo__ = "https://github.com/adafruit/Adafruit_Micropython_Blinka.git"
+if board_id == ap_board.FEATHER_HUZZAH:
+ from adafruit_blinka.board.feather_huzzah import *
+elif board_id == ap_board.NODEMCU:
+ from adafruit_blinka.board.nodemcu import *
-if board == "feather_huzzah":
- pass
-elif board == "feather_m0_express":
- pass
-elif board == "nodemcu":
- pass
-elif board == "pyboard":
+elif board_id == ap_board.PYBOARD:
+ from adafruit_blinka.board.pyboard import *
+
+elif detector.board.any_raspberry_pi_40_pin:
+ from adafruit_blinka.board.raspi_40pin import *
+
+elif detector.board.RASPBERRY_PI_B_REV1:
+ from adafruit_blinka.board.raspi_1b_rev1 import *
+
+# elif detector.board.RASPBERRY_PI_B_REV2:
+# from adafruit_blinka.board.raspi_1b_rev2 import *
+
+elif board_id == ap_board.BEAGLEBONE_BLACK:
+ from adafruit_blinka.board.beaglebone_black import *
+
+elif board_id == ap_board.ORANGE_PI_PC:
+ from adafruit_blinka.board.orangepipc import *
+
+elif "sphinx" in sys.modules:
pass
+
else:
raise NotImplementedError("Board not supported")
-gc.collect()
\ No newline at end of file