1 """Allows useful indirection to test Pin naming logic by switching platform in testing
2 or provide bootstrapping logic for board identification where auto-detection is not
3 feasible (e.g. multiple ESP8266 boards architecturally identical). Once runtime
4 environment is established, can choose various routes to make available and re-export
5 common modules and operations, depending on platform support
8 import adafruit_platformdetect
10 # We intentionally are patching into this namespace as module names so skip the name check.
11 # pylint: disable=invalid-name
13 detect = adafruit_platformdetect.PlatformDetect()
15 board_name = detect.board.name()
16 chip_name = detect.chip.name()
18 implementation = sys.implementation.name
19 if implementation == "micropython":
20 from utime import sleep
21 elif implementation == "circuitpython" or implementation == "cpython":
22 from time import sleep