@@ -131,6 +131,13 @@ def init(self, scl, sda, frequency):
131
131
I2C_KB2040 as _I2C ,
132
132
)
133
133
134
+ self ._i2c = _I2C (scl , sda , frequency = frequency )
135
+ return
136
+ if detector .board .radxa_x4_u2if :
137
+ from adafruit_blinka .microcontroller .rp2040_u2if .i2c import (
138
+ I2C_Radxa_X4 as _I2C ,
139
+ )
140
+
134
141
self ._i2c = _I2C (scl , sda , frequency = frequency )
135
142
return
136
143
if detector .chip .id == ap_chip .RP2040 :
@@ -341,6 +348,14 @@ def __init__(self, clock, MOSI=None, MISO=None):
341
348
SPI_KB2040 as _SPI ,
342
349
)
343
350
351
+ self ._spi = _SPI (clock ) # this is really all that's needed
352
+ self ._pins = (clock , clock , clock ) # will determine MOSI/MISO from clock
353
+ return
354
+ if detector .board .radxa_x4_u2if :
355
+ from adafruit_blinka .microcontroller .rp2040_u2if .spi import (
356
+ SPI_Radxa_X4 as _SPI ,
357
+ )
358
+
344
359
self ._spi = _SPI (clock ) # this is really all that's needed
345
360
self ._pins = (clock , clock , clock ) # will determine MOSI/MISO from clock
346
361
return
@@ -442,6 +457,10 @@ def configure(self, baudrate=100000, polarity=0, phase=0, bits=8):
442
457
)
443
458
elif detector .board .qtpy_u2if :
444
459
from adafruit_blinka .microcontroller .rp2040_u2if .spi import SPI_QTPY as _SPI
460
+ elif detector .board .radxa_x4_u2if :
461
+ from adafruit_blinka .microcontroller .rp2040_u2if .spi import (
462
+ SPI_Radxa_X4 as _SPI ,
463
+ )
445
464
elif detector .chip .id == ap_chip .RP2040 :
446
465
from adafruit_blinka .microcontroller .rp2040 .spi import SPI as _SPI
447
466
elif detector .board .any_siemens_iot2000 :
0 commit comments