Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect maximum number of USB endpoints #467

Open
vintagepc opened this issue Sep 28, 2021 · 1 comment
Open

Incorrect maximum number of USB endpoints #467

vintagepc opened this issue Sep 28, 2021 · 1 comment

Comments

@vintagepc
Copy link
Contributor

The AVR USB code hard-caps the number of endpoints at 5.

struct _epstate ep_state[5];

const uint8_t num_endpoints = 5;//sizeof (struct usb_internal_state.ep_state) / sizeof (struct usb_internal_state.ep_state[0]);

This is as expected for the AT90 example part but is too small for parts like the 32u4 which have USB defined and up to 7 configurable endpoints.

@vintagepc vintagepc changed the title Incorrect maximum number of endpoints Incorrect maximum number of USB endpoints Sep 28, 2021
@leptun
Copy link

leptun commented Sep 28, 2021

Also, is ENDPOINT_EPNUM_MASK correct? Right now it is 0x0F, but the AVR MCUs that support USB only ever use 3 bits, not 4. This could potentially result in writing a reserved bit in UENUM.

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

No branches or pull requests

2 participants