usbif ยท moved

usbif has moved, to two homes.

usbif The C module is now usbhost, in micropython-pydevices as modules/usbhost (its binding is _usbhost, it was _usbif). The Python USB packages (usb.core, the host and device classes, usb-hid) are top-level packages in pydevices, installed with mip. Code that uses the packages doesn't change. The old repository is archived.

modules/usbhost USB packages in pydevices micropython-pydevices Archived repo

Where it went

Same code, same history, one repository fewer

usbif split in two. Its C module is now usbhost, in micropython-pydevices, the repository that builds MicroPython with PyDevices' C modules compiled in. Its Python packages are in pydevices. The old repository is archived and kept as a record; open issues and pull requests against micropython-pydevices.

Install the Python packages

usb.core, the host classes, the device classes
import mip
mip.install("github:PyDevices/pydevices/usb-host-msc")

The packages (usb-core, usb-host-msc, -hid, -cdc, -audio, -video, -net, usb-device-audio, -video, -msc and usb-hid) are top-level packages in pydevices, beside midiports. Code that uses them doesn’t change.

Build it in

Name it in the build, as before
git clone https://github.com/PyDevices/micropython-pydevices
cd micropython-pydevices
./build_mp.py --port esp32 --board ESP32_GENERIC_S3 --variant SPIRAM_OCT --modules usbhost

The C module is now usbhost, and its binding is _usbhost (it was _usbif), so code that imported _usbif directly imports _usbhost. The examples, the proof matrix and the host checks moved with it.

Read more

The documentation moved with the code

USB in pydevices

The packages, what each one does, and how to install them.

usbhost newcomer's guide

How the C module and the Python packages fit together, as a device and as a host.

Examples

A keyboard, a drive, a MIDI controller, a webcam, a sound card.

Module README

Install, boards and the proof matrix.