Skip to content

USB Enumeration V2#100

Open
kammce wants to merge 11 commits into
mainfrom
usb-enum-v2
Open

USB Enumeration V2#100
kammce wants to merge 11 commits into
mainfrom
usb-enum-v2

Conversation

@kammce
Copy link
Copy Markdown
Member

@kammce kammce commented May 7, 2026

No description provided.

@kammce kammce marked this pull request as ready for review May 12, 2026 03:04
@kammce kammce changed the title Usb enum v2 USB Enumeration V2 May 12, 2026
kammce added 2 commits May 13, 2026 20:45
- Fix UB bug with bit_value operator=
- Fix const for get() in bit_value
- Add configuration_totals struct to return both length and interface count
- Update prepare_descriptors to return configuration_totals
- Use actual interface count from prepare_descriptors in generate_configuration_descriptor
- Fixes issue where second CDC interface wasn't properly enumerated
return;
}

auto event = *m_event;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: m_event.value() more readable and clear that this is an optional, not a pointer

using hal::v5::scatter_span_size;
using hal::v5::sub_scatter_result;

class enumerator
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Assuming this will be the default single configuration enumerator. If I want a multi-config descriptor one I can make that its own thing (I want it for POC purposes not actual use). Do we want to factor some of this out so people can build their own enumerators? Not this PR, just an idea.

};

template<usize InterfaceCount>
class inplace_enumerator : public enumerator
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pretty self-evident but documentation for API docs?

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