Repository navigation
chore(usb_device): C++ standard after project(), UsbCdc doc section explains the composite example - #835
Merged
Conversation
…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
Contributor
There was a problem hiding this comment.
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
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_STANDARDconfiguration to afterproject()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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Two small follow-ups from the post-merge review of #834:
components/usb_device/example/CMakeLists.txtsetsCMAKE_CXX_STANDARDafterproject(), like the ODrive USB example and the other examples, so it is not finalized away by the IDF project setup.UsbCdcheader's example section now says the snippet is the composite USB device example and thatUsbCdcis its CDC-only subset, instead of just pointing at it.Test plan
components/usb_device/examplebuilds for esp32s3 (manager off).🤖 Generated with Claude Code
https://claude.ai/code/session_01DFjjnq3XCTRAXENSxsCxJU