Skip to content

examples: catalog every shipping use of usbif - #9

Merged
bdbarnett merged 1 commit into
mainfrom
branch/usbif-example-catalog-8b7e
Sep 7, 2026
Merged

examples: catalog every shipping use of usbif#9
bdbarnett merged 1 commit into
mainfrom
branch/usbif-example-catalog-8b7e

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

Summary

Extends the usbif examples so each shipping capability has a stranger-readable script, without touching src/.

  • Keep all existing examples; correct stale headers on midi_host.py (host MIDI is proven) and uac_pump.py (Python FIFO helper, not the shipping card).
  • Device: soundcard.py (C pump), hid_keyboard.py, hid_mouse.py, ram_drive.py.
  • Host: host_enum.py, hid_host.py, usb_serial.py, usb_speaker.py, usb_mic.py.
  • UVC host: uvc_display.py prefers MJPEG via jpegio when present, falls back to YUY2.
  • Catalog: README example table + examples/README.md with class×role grid, P4-device / S3-host pairings (headline: P4 soundcard.py + S3 usb_speaker.py), VBUS warning.

Firmware holes filed (not fixed here)

  • usbif#7 — device UAC speaker-only (no mic)
  • usbif#8 — portable Device.functions() omits video
  • Cited: #3 P4 host, #2 FIFO bias

Out of scope

Hardware runs this session; src/ changes; closing accidental #6 (bot lacks closeIssue).

Test plan

  • P4: soundcard.py — Speakers appear on a PC; audio audible
  • S3: usb_speaker.py hosting the P4 — tone on P4 speaker
  • hid_keyboard.py / hid_mouse.py against a PC
  • hid_host.py with a keyboard (M1 events)
  • uvc_display.py with jpegio firmware (MJPEG) and without (YUY2)
  • host_enum.py on board and on desktop CPython
  • costume_selftest.py still 31/31

Keep the existing demos; add the missing device and host scripts
(soundcard, HID both ways, RAM disk, enum, CDC, UAC host play/capture);
grow uvc_display with a jpegio MJPEG branch; correct stale midi_host and
uac_pump headers; document board-to-board pairings and firmware holes by
issue number.
@bdbarnett
bdbarnett marked this pull request as ready for review September 7, 2026 04:05
@bdbarnett
bdbarnett merged commit edea99c into main Sep 7, 2026
9 checks passed
@bdbarnett
bdbarnett deleted the branch/usbif-example-catalog-8b7e branch September 7, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants