From: Cefn Hoile Date: Sun, 18 Feb 2018 01:26:09 +0000 (+0000) Subject: Platform-dependent routine to get hardware test fixtures X-Git-Tag: 0.1.0~4^2~136 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/152a78278903e74ea1332ffb23033f7c91eeb62a?ds=inline Platform-dependent routine to get hardware test fixtures --- diff --git a/python/testing/platform/mcp/__init__.py b/python/testing/platform/mcp/__init__.py new file mode 100644 index 0000000..dbc1e6c --- /dev/null +++ b/python/testing/platform/mcp/__init__.py @@ -0,0 +1,8 @@ +def create_pin(): + from microcontroller import Pin + name, pin = next(Pin.iteritems()) # grab first pin + return pin + +def create_dio(): + import digitalio + return digitalio.DigitalInOut(create_pin()) \ No newline at end of file