+# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
"""
`busio` - Bus protocol support like I2C and SPI
=================================================
I2C_ItsyBitsy as _I2C,
)
+ self._i2c = _I2C(scl, sda, frequency=frequency)
+ return
+ if detector.board.macropad_u2if:
+ from adafruit_blinka.microcontroller.rp2040_u2if.i2c import (
+ I2C_MacroPad as _I2C,
+ )
+
self._i2c = _I2C(scl, sda, frequency=frequency)
return
if detector.board.qt2040_trinkey_u2if:
SPI_ItsyBitsy 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.macropad_u2if:
+ from adafruit_blinka.microcontroller.rp2040_u2if.spi import (
+ SPI_MacroPad 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
from adafruit_blinka.microcontroller.rp2040_u2if.spi import (
SPI_ItsyBitsy as _SPI,
)
+ elif detector.board.macropad_u2if:
+ from adafruit_blinka.microcontroller.rp2040_u2if.spi import (
+ SPI_MacroPad as _SPI,
+ )
elif detector.board.qtpy_u2if:
from adafruit_blinka.microcontroller.rp2040_u2if.spi import SPI_QTPY as _SPI
elif detector.chip.id == ap_chip.RP2040:
def write(self, buf):
"""Write to the UART from a buffer"""
return self._uart.write(buf)
-
-
-class OneWire:
- """
- Stub class for OneWire, which is currently not implemented
- """
-
- def __init__(self, pin):
- raise NotImplementedError("OneWire has not been implemented")
-
- def deinit(self):
- """
- Deinitialize the OneWire bus and release any hardware resources for reuse.
- """
- raise NotImplementedError("OneWire has not been implemented")
-
- def reset(self):
- """
- Reset the OneWire bus and read presence
- """
- raise NotImplementedError("OneWire has not been implemented")
-
- def read_bit(self):
- """
- Read in a bit
- """
- raise NotImplementedError("OneWire has not been implemented")
-
- def write_bit(self, value):
- """
- Write out a bit based on value.
- """
- raise NotImplementedError("OneWire has not been implemented")