cnlohr / rv003usb

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

Use final transaction of SETUP to validate it was received #17

Open cnlohr opened 1 year ago

cnlohr commented 1 year ago

Because it goes

SETUP - DATA 0 - ( PID OUT - DATA ) - PID IN (reply with data, or null data) - (PID OUT - DATA [null reply])

Don't send DATA OUT unless setup and DATA IN was OK.

I guess that means we need to figure out if we have an invalid state, i.e. chatter on EP0 w/o a SETUP