cnlohr / rv003usb

CH32V003 RISC-V Pure Software USB Controller
MIT License
436 stars 43 forks source link

USB Endpoint sturct 'opaque' variable very obscure #58

Closed ADBeta closed 3 months ago

ADBeta commented 3 months ago

in other_usb_controls loops, the variable 'opaque' is set as such e->opaque = 1;

this causes a compiler warning as it is setting a pointer to literal 1. new method without warning, and comment what the opaque variable does

note: cnlohr mentioned "Honestly it should be a #define".

cnlohr commented 3 months ago

Turns out that was a bug, I got my USB stacks mixed up. It was only in cdc_exp.c

I fixed it.