]> Repositories - Adafruit_Blinka-hackapet.git/blobdiff - src/board.py
Merge remote-tracking branch 'ada/master' into jetson
[Adafruit_Blinka-hackapet.git] / src / board.py
index fef78ee0a36c3c3193b1272d50bf5f04077a02b9..db6f8a4655bb5ec59b1e32b7db6d3a59895a879d 100755 (executable)
@@ -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)