Skip to content

chore(usb_device): C++ standard after project(), UsbCdc doc section explains the composite example - #835

Merged
finger563 merged 1 commit into
mainfrom
fix/usb-device-example-tidy
Oct 1, 2026
Merged

finger563 merged 1 commit into
mainfrom
fix/usb-device-example-tidy

Conversation

@finger563

Copy link
Copy Markdown
Contributor

Summary

Two small follow-ups from the post-merge review of #834:

  • components/usb_device/example/CMakeLists.txt sets CMAKE_CXX_STANDARD after project(), like the ODrive USB example and the other examples, so it is not finalized away by the IDF project setup.
  • The UsbCdc header's example section now says the snippet is the composite USB device example and that UsbCdc is its CDC-only subset, instead of just pointing at it.

Test plan

  • components/usb_device/example builds for esp32s3 (manager off).

🤖 Generated with Claude Code

https://claude.ai/code/session_01DFjjnq3XCTRAXENSxsCxJU

…xplains the composite example

Post-merge review of #834: the example sets CMAKE_CXX_STANDARD after
project() like the ODrive USB example, and the UsbCdc header's example
section says the snippet is the composite device (CDC next to vendor + MSC).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DFjjnq3XCTRAXENSxsCxJU
Copilot AI balanced review requested due to automatic review settings October 1, 2026 03:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adjusts the USB device example’s CMake configuration to reliably use C++20 under ESP-IDF, and clarifies the UsbCdc documentation to better describe what the snippet demonstrates.

Changes:

  • Move CMAKE_CXX_STANDARD configuration to after project() in the USB device example CMakeLists.
  • Expand UsbCdc’s example documentation to explain it’s a CDC-only subset of the composite USB device example.
File Description
components/​usb_device/​include/​usb_cdc.hpp Clarifies the relationship between UsbCdc and the composite USB example referenced by the snippet.
components/​usb_device/​example/​CMakeLists.txt Reorders CMAKE_CXX_STANDARD assignment to avoid ESP-IDF project setup overriding it.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread components/usb_device/example/CMakeLists.txt
@finger563
finger563 merged commit d05015e into main Oct 1, 2026
170 of 171 checks passed
@finger563
finger563 deleted the fix/usb-device-example-tidy branch October 1, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants