X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/f4f44cf730870773ff87242037bf7fd5f6acd8cd..5c2512abe5fa4f633afa94c742f3cd6bbf24c401:/test/src/testing/board/__init__.py diff --git a/test/src/testing/board/__init__.py b/test/src/testing/board/__init__.py new file mode 100644 index 0000000..0732f78 --- /dev/null +++ b/test/src/testing/board/__init__.py @@ -0,0 +1,22 @@ +"""Configuration of testing fixtures depending on the board layout""" +from adafruit_blinka import agnostic + +if agnostic.board == "feather_m0_express": + default_pin = feather_m0_express.D5 + led_pin = feather_m0_express.D13 + led_hardwired = True + led_inverted = False +elif agnostic.board == "feather_huzzah": + from adafruit_blinka.board import feather_huzzah + + default_pin = feather_huzzah.GPIO4 + led_pin = feather_huzzah.GPIO0 # red led + led_hardwired = True + led_inverted = True +elif agnostic.board == "pyboard": + default_pin = pyboard.X1 + led_pin = adafruit_blinka.board.pyboard.LED_BLUE + led_hardwired = True + led_inverted = False +else: + raise NotImplementedError("Board not supported")