X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/blobdiff_plain/e581ddf6e329e49b0c7c48c3c0ac967aa6a30571..4ce7761a8b73ddc453ec6f64b35e73b33e43a3a2:/src/busio.py diff --git a/src/busio.py b/src/busio.py index c9c2d4d..08761c4 100644 --- a/src/busio.py +++ b/src/busio.py @@ -9,6 +9,7 @@ See `CircuitPython:busio` in CircuitPython for more details. * Author(s): cefn """ +import os try: import threading except ImportError: @@ -53,6 +54,13 @@ class I2C(Lockable): self._i2c = _I2C(frequency=frequency) return + + if "BLINKA_FORCECHIP" in os.environ and os.environ["BLINKA_FORCEBOARD"] == "GENERIC_AGNOSTIC_BOARD": + from adafruit_blinka.microcontroller.generic_agnostic_board.i2c import I2C as _I2C + + self._i2c = _I2C(frequency=frequency) + return + if detector.board.greatfet_one: from adafruit_blinka.microcontroller.nxp_lpc4330.i2c import I2C as _I2C