-"""Pin definitions for the Feather RP2040 with u2if firmware."""
-
"""
+Pin definitions for the Feather RP2040 with u2if firmware.
+
Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit Feather RP2040 with rp2040
>>> import board
>>> board.
MISO = pin.GP20
# access u2if via pin instance to open for specifc VID/PID
+# pylint:disable = protected-access
pin.GP0._u2if_open_hid(0x239A, 0x00F1)
-"""Pin definitions for the ItsyBitsy RP2040 with u2if firmware."""
-
"""
+Pin definitions for the ItsyBitsy RP2040 with u2if firmware.
+
Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit ItsyBitsy RP2040 with rp2040
>>> import board
>>> board.
BUTTON = pin.GP13
# access u2if via pin instance to open for specifc VID/PID
+# pylint:disable = protected-access
pin.GP0._u2if_open_hid(0x239A, 0x00FD)
NEOPIXEL = pin.GP27
# access u2if via pin instance to open for specifc VID/PID
+# pylint:disable = protected-access
pin.GP0._u2if_open_hid(0x239A, 0x0109)
-"""Pin definitions for the QT Py RP2040 with u2if firmware."""
-
"""
+Pin definitions for the QT Py RP2040 with u2if firmware.
+
Adafruit CircuitPython 6.2.0 on 2021-04-05; Adafruit QTPy RP2040 with rp2040
>>> import board
>>> board.
BUTTON = pin.GP21
# access u2if via pin instance to open for specifc VID/PID
+# pylint:disable = protected-access
pin.GP0._u2if_open_hid(0x239A, 0x00F7)
PWM_GET_DUTY_NS = 0x37
def __init__(self):
+ self._vid = None
+ self._pid = None
+ self._hid = None
self._opened = False
self._i2c_index = None
self._spi_index = None
self._serial = None
self._neopixel_initialized = False
- # self._vid = vid
- # self._pid = pid
- # self._hid = hid.device()
- # self._hid.open(self._vid, self._pid)
- # if RP2040_U2IF_RESET_DELAY >= 0:
- # self._reset()
- # self._i2c_index = None
- # self._spi_index = None
- # self._serial = None
- # self._neopixel_initialized = False
- # self._uart_rx_buffer = None
+ self._uart_rx_buffer = None
def _hid_xfer(self, report, response=True):
"""Perform HID Transfer"""
# MISC
# ----------------------------------------------------------------
def open(self, vid, pid):
+ """Open HID interface for given USB VID and PID."""
+
if self._opened:
return
self._vid = vid