Open vintagepc opened 2 years ago
The AVR USB code hard-caps the number of endpoints at 5.
https://github.com/buserror/simavr/blob/ea4c4504d15117223a23e2dd6edb745fea61ceae/simavr/sim/avr_usb.c#L151
https://github.com/buserror/simavr/blob/ea4c4504d15117223a23e2dd6edb745fea61ceae/simavr/sim/avr_usb.c#L156
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.
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.
ENDPOINT_EPNUM_MASK
The AVR USB code hard-caps the number of endpoints at 5.
https://github.com/buserror/simavr/blob/ea4c4504d15117223a23e2dd6edb745fea61ceae/simavr/sim/avr_usb.c#L151
https://github.com/buserror/simavr/blob/ea4c4504d15117223a23e2dd6edb745fea61ceae/simavr/sim/avr_usb.c#L156
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.