metronome/rust/pm-grid/Cargo.toml
Me Here 56bff7e599 pm-grid: USB-MIDI audio + make Rust the shipping Grid firmware
Audio (the Scroll Pack has no speaker, so MIDI is the only path):
- usb-device 0.3 + usbd-midi 0.5 on the rp2040-hal UsbBus; enumerates as a
  class-compliant MIDI device 'PM_G-1 Grid'.
- tick() emits a GM note-on per lane hit on channel 10 (note from the ported
  SOUND_GM map, velocity by level) via send_bytes([0x09,0x99,note,vel]) — raw
  4-byte packets, so arbitrary GM drum notes work without the named Note enum.
- USB polled every loop iteration AND during the boot splash (so the host can
  enumerate during the ~2.5s animation).

Debug: defmt/defmt-rtt + panic-probe + flip-link; runner probe-rs run --chip
RP2040 (Pi Debug Probe). build.sh emits pm-grid.uf2 + pm-grid.elf; deploy serves
both; key info! log points + 1Hz heartbeat.

Web: drop CircuitPython from the PM_G-1 product. info-grid.html features the
Rust .uf2 download + accurate controls/views (X/Y swap, Ticker); build.sh +
deploy.sh no longer bundle/serve pm_g1_circuitpy.zip or pico-scroll-app.{py,mpy}.
pico-scroll/ stays as the reference port; editor FW_PATHS.G left for graceful
degradation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 15:19:38 -05:00

24 lines
936 B
TOML

[package]
name = "pm-grid"
version = "0.1.0"
edition = "2021"
description = "PM_G-1 'Grid' firmware (RP2040 / Pimoroni Pico Scroll Pack PIM545). 17x7 IS31FL3731 LED metronome — Rust sibling of pico-scroll/app.py."
[dependencies]
rp2040-hal = { version = "0.10", features = ["rt", "critical-section-impl", "defmt"] }
rp2040-boot2 = "0.3"
cortex-m = "0.7"
cortex-m-rt = "0.7"
defmt = "0.3"
defmt-rtt = "0.4" # logs over RTT, read by `probe-rs run` (the Pi Debug Probe)
panic-probe = { version = "0.3", features = ["print-defmt"] }
embedded-hal = "1"
track-format = { path = "../track-format" }
embedded-alloc = "0.6" # track-format parses into Vec/String → needs a global allocator
usb-device = "0.3" # USB device stack (rp2040-hal provides the UsbBus)
usbd-midi = "0.5" # USB-MIDI class — the Scroll Pack's only audio path (no speaker)
[profile.release]
opt-level = "s"
lto = true
debug = 2