X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/9ee0ad5ca97bd23a45a03af5f22e1a08abfe0992..3678f1e186b757fc8e7a94f0c117999c286f5667:/src/board.py diff --git a/src/board.py b/src/board.py index a491a0e..2b8aa14 100755 --- a/src/board.py +++ b/src/board.py @@ -55,14 +55,48 @@ elif detector.board.RASPBERRY_PI_B_REV2: elif board_id == ap_board.BEAGLEBONE_BLACK: from adafruit_blinka.board.beaglebone_black import * +elif board_id == ap_board.BEAGLEBONE_POCKETBEAGLE: + from adafruit_blinka.board.beaglebone_pocketbeagle import * + elif board_id == ap_board.ORANGE_PI_PC: from adafruit_blinka.board.orangepipc import * +elif board_id == ap_board.ORANGE_PI_R1: + from adafruit_blinka.board.orangepir1 import * + elif board_id == ap_board.GIANT_BOARD: from adafruit_blinka.board.giantboard import * +elif board_id == ap_board.JETSON_TX1: + from adafruit_blinka.board.jetson_tx1 import * + +elif board_id == ap_board.JETSON_TX2: + from adafruit_blinka.board.jetson_tx2 import * + +elif board_id == ap_board.JETSON_XAVIER: + from adafruit_blinka.board.jetson_xavier import * + +elif board_id == ap_board.JETSON_NANO: + from adafruit_blinka.board.jetson_nano import * + +elif board_id == ap_board.CORAL_EDGE_TPU_DEV: + from adafruit_blinka.board.coral_edge_tpu import * + +elif board_id == ap_board.ODROID_C2: + from adafruit_blinka.board.odroidc2 import * + elif "sphinx" in sys.modules: pass 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)