X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/31e8ce37f3af367ced18d7da63e0244a145c66ab..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)