From e8b30f3489eb98b2cde404bbc00fa8e6ef4f0127 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Thu, 18 Oct 2012 19:42:36 -0700 Subject: [PATCH] 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.) --- firmware/usb_performance/usb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/usb_performance/usb.c b/firmware/usb_performance/usb.c index 535cb52d..2737201e 100644 --- a/firmware/usb_performance/usb.c +++ b/firmware/usb_performance/usb.c @@ -557,6 +557,9 @@ static void usb_check_for_setup_events() { ); if( endpoint && endpoint->setup_complete ) { 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); endpoint->setup_complete(endpoint); } else {