Conversation
ZR233
commented
Jan 27, 2026
- add uvc-parse cargo alias for easier frame parsing workflow
- update test README to use new cargo aliases
- remove commented out code and unused field in UvcDevice
- fix build.rs condition to only enable umod when libusb feature is active
- improve code maintainability by removing dead code
- add uvc-parse cargo alias for easier frame parsing workflow - update test README to use new cargo aliases - remove commented out code and unused field in UvcDevice - fix build.rs condition to only enable umod when libusb feature is active - improve code maintainability by removing dead code
There was a problem hiding this comment.
Pull request overview
Refactors UVC-related code and improves developer workflow by introducing a new Cargo alias for parsing captured UVC frames, updating documentation accordingly, and tightening build configuration so umod is only enabled when the libusb feature is active.
Changes:
- Gate
umodcfg emission inusb-host/build.rsbehind thelibusbCargo feature. - Remove dead/commented-out UVC code and an unused
UvcDevicefield. - Add
uvc-parseCargo alias and update the UVC test README to use the aliases.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| usb-host/build.rs | Only enables umod cfg when the libusb feature is enabled. |
| usb-device/uvc/src/lib.rs | Removes unused video_control_interface_num and dead commented code. |
| test_crates/test_xhci_uvc/README.md | Switches instructions to use the Cargo aliases. |
| .cargo/config.toml | Adds uvc-parse alias (and keeps test-uvc-uboot alias). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| test-uboot = "test -p test_hub --test test --target aarch64-unknown-none-softfloat -- uboot" | ||
| test-dwc = "test -p test_dwc --test test_dwc --target aarch64-unknown-none-softfloat -- uboot" | ||
| test-uvc-uboot = "test -p test_xhci_uvc --test test --target aarch64-unknown-none-softfloat -- uboot | tee target/uvc.log" No newline at end of file | ||
| test-uvc-uboot = "test -p test_xhci_uvc --test test --target aarch64-unknown-none-softfloat -- uboot | tee target/uvc.log" |
There was a problem hiding this comment.
test-uvc-uboot uses a shell pipe (| tee ...). Cargo aliases don’t invoke a shell unless the command is prefixed with !, so this will be tokenized as arguments to cargo test and the log won’t be captured. Consider changing the alias to a shell alias (e.g., !sh -c ...) or removing the pipe and documenting a separate tee step.
| test-uvc-uboot = "test -p test_xhci_uvc --test test --target aarch64-unknown-none-softfloat -- uboot | tee target/uvc.log" | |
| test-uvc-uboot = "!sh -c 'cargo test -p test_xhci_uvc --test test --target aarch64-unknown-none-softfloat -- uboot | tee target/uvc.log'" |