X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/6ce470ecf6b8e3ab8aa79da30c032249d13d0652..ec3ddd9f3e7a2e6f7114ba2f74448198134b3672:/src/board.py diff --git a/src/board.py b/src/board.py index 3303bb0..9de4172 100755 --- a/src/board.py +++ b/src/board.py @@ -215,22 +215,28 @@ elif board_id == ap_board.NANOPI_NEO_AIR: elif board_id == ap_board.NANOPI_DUO2: from adafruit_blinka.board.nanopi.duo2 import * +elif board_id == ap_board.PICO_U2IF: + from adafruit_blinka.board.pico_u2if import * + elif "sphinx" in sys.modules: pass else: raise NotImplementedError("Board not supported {}".format(board_id)) +if SCL and SDA: + + def I2C(): + """The singleton I2C interface""" + import busio -def I2C(): - """The singleton I2C interface""" - import busio + return busio.I2C(SCL, SDA) - return busio.I2C(SCL, SDA) +if SCLK and MOSI and MISO: -def SPI(): - """The singleton SPI interface""" - import busio + def SPI(): + """The singleton SPI interface""" + import busio - return busio.SPI(SCLK, MOSI, MISO) + return busio.SPI(SCLK, MOSI, MISO)