X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/b459cd119e44fcb9df868d9fa4eb77fb64d0e307..b1791118aaed7d4c5219168f460382b46d3a15aa:/src/board.py?ds=sidebyside diff --git a/src/board.py b/src/board.py index e13d952..c89fd43 100755 --- a/src/board.py +++ b/src/board.py @@ -78,3 +78,13 @@ elif "sphinx" in sys.modules: else: raise NotImplementedError("Board not supported") + +def I2C(): + """The singleton I2C interface""" + import busio + return busio.I2C(SCL, SDA) + +def SPI(): + """The singleton SPI interface""" + import busio + return busio.SPI(SCLK, MOSI, MISO)