X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/68e55a854969c28aa2a4e9bb9b898a460d76ac45..70f249a0d53ee0756edc872404fe9c8000b0d17b:/src/busio.py diff --git a/src/busio.py b/src/busio.py index c7b9eb3..8f41667 100644 --- a/src/busio.py +++ b/src/busio.py @@ -67,6 +67,13 @@ class I2C(Lockable): I2C_Feather as _I2C, ) + self._i2c = _I2C(scl, sda, frequency=frequency) + return + if detector.board.feather_can_u2if: + from adafruit_blinka.microcontroller.rp2040_u2if.i2c import ( + I2C_Feather_CAN as _I2C, + ) + self._i2c = _I2C(scl, sda, frequency=frequency) return if detector.board.feather_epd_u2if: @@ -74,6 +81,13 @@ class I2C(Lockable): I2C_Feather_EPD as _I2C, ) + self._i2c = _I2C(scl, sda, frequency=frequency) + return + if detector.board.feather_rfm_u2if: + from adafruit_blinka.microcontroller.rp2040_u2if.i2c import ( + I2C_Feather_RFM as _I2C, + ) + self._i2c = _I2C(scl, sda, frequency=frequency) return if detector.board.qtpy_u2if: @@ -252,6 +266,14 @@ class SPI(Lockable): SPI_Feather as _SPI, ) + self._spi = _SPI(clock) # this is really all that's needed + self._pins = (clock, clock, clock) # will determine MOSI/MISO from clock + return + if detector.board.feather_can_u2if: + from adafruit_blinka.microcontroller.rp2040_u2if.spi import ( + SPI_Feather_CAN as _SPI, + ) + self._spi = _SPI(clock) # this is really all that's needed self._pins = (clock, clock, clock) # will determine MOSI/MISO from clock return @@ -260,6 +282,14 @@ class SPI(Lockable): SPI_Feather_EPD as _SPI, ) + self._spi = _SPI(clock) # this is really all that's needed + self._pins = (clock, clock, clock) # will determine MOSI/MISO from clock + return + if detector.board.feather_rfm_u2if: + from adafruit_blinka.microcontroller.rp2040_u2if.spi import ( + SPI_Feather_RFM as _SPI, + ) + self._spi = _SPI(clock) # this is really all that's needed self._pins = (clock, clock, clock) # will determine MOSI/MISO from clock return