Oops. Request handlers called from setup handler could access the IN side of the endpoint, which does not get a copy of the SETUP bytes.
TODO: Make a single copy of the SETUP bytes, and provide a clean way to access those bytes regardless of whether you're holding the IN or OUT endpoint. (This was a problem in the IN complete handler, and probably other places, too.)
This commit is contained in:
@ -557,6 +557,9 @@ static void usb_check_for_setup_events() {
|
|||||||
);
|
);
|
||||||
if( endpoint && endpoint->setup_complete ) {
|
if( endpoint && endpoint->setup_complete ) {
|
||||||
copy_setup(&endpoint->setup, usb_queue_head(endpoint->address)->setup);
|
copy_setup(&endpoint->setup, usb_queue_head(endpoint->address)->setup);
|
||||||
|
// TODO: Clean up this duplicated effort by providing
|
||||||
|
// a cleaner way to get the SETUP data.
|
||||||
|
copy_setup(&endpoint->in->setup, usb_queue_head(endpoint->address)->setup);
|
||||||
usb_clear_endpoint_setup_status(endptsetupstat_bit);
|
usb_clear_endpoint_setup_status(endptsetupstat_bit);
|
||||||
endpoint->setup_complete(endpoint);
|
endpoint->setup_complete(endpoint);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user