This repository has been archived on 2026-08-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
donglora/Cargo.toml
T
swaitsandClaude Opus 4.6 4e7e6d2167 feat: USB OTG CDC-ACM with custom VID:PID, disconnect UX
Switch all ESP32-S3 boards from UsbSerialJtag to USB OTG CDC-ACM via
embassy-usb. The USB device stack is now shared code — boards only
provide the platform-specific embassy-usb Driver.

- Custom VID:PID 1209:5741 (open-source VID, "WA" PID)
- CDC-ACM class with proper device enumeration
- COBS+postcard protocol over CDC-ACM packet read/write
- Concurrent USB device loop + protocol loop via join()
- On disconnect: sends DisplayCommand::Reset to show "Waiting for host..."
- Justfile: espflash no longer uses --monitor (OTG steals PHY)
- Test script updated to detect by new VID:PID

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:42:56 -06:00

74 lines
2.1 KiB
TOML

[package]
name = "donglora"
version = "0.1.0"
edition = "2021"
build = "build.rs"
[dependencies]
cfg-if = "1.0"
critical-section = "1.2"
defmt = "0.3"
embassy-embedded-hal = "0.2"
embassy-executor = { version = "0.6", features = ["task-arena-size-32768"] }
embassy-sync = "0.6"
embassy-time = "0.3"
embassy-usb = { version = "0.3", features = ["defmt"] }
embassy-usb-driver = "0.1"
heapless = { version = "0.8", features = ["serde"] }
lora-phy = "3.0"
postcard = { version = "1.0", default-features = false }
serde = { version = "1.0", default-features = false, features = ["derive"] }
static_cell = "2.1"
# Display rendering
display-interface = "0.5"
embedded-graphics = "0.8"
ssd1306 = { version = "0.10", features = ["async"] }
# Async IO traits and combinators
embedded-io-async = "0.6"
embassy-futures = "0.1"
# ESP32-S3 (Heltec V3) — requires esp toolchain (espup)
esp-backtrace = { version = "0.14", optional = true, features = ["esp32s3", "panic-handler", "exception-handler", "defmt"] }
esp-hal = { version = "0.22", optional = true, features = ["esp32s3"] }
esp-hal-embassy = { version = "0.5", optional = true, features = ["esp32s3"] }
esp-println = { version = "0.12", optional = true, features = ["esp32s3", "defmt-espflash"] }
# nRF52840 (RAK 4631)
cortex-m-rt = { version = "0.7", optional = true }
embassy-nrf = { version = "0.2", optional = true, features = ["nrf52840", "gpiote", "time-driver-rtc1", "defmt"] }
panic-probe = { version = "0.3", optional = true, features = ["print-defmt"] }
[build-dependencies]
minijinja = "2.0"
owo-colors = "4.0"
[features]
heltec_v3 = [
"dep:esp-backtrace",
"dep:esp-hal",
"dep:esp-hal-embassy",
"dep:esp-println",
"embassy-time/generic-queue-8",
]
heltec_v4 = [
"dep:esp-backtrace",
"dep:esp-hal",
"dep:esp-hal-embassy",
"dep:esp-println",
"embassy-time/generic-queue-8",
]
rak_wisblock_4631 = [
"dep:cortex-m-rt",
"dep:embassy-nrf",
"dep:panic-probe",
"embassy-executor/arch-cortex-m",
"embassy-executor/executor-thread",
]
[profile.release]
codegen-units = 1
lto = "fat"
opt-level = 3