Stall USB endpoint if control request is not handled.

This commit is contained in:
Jared Boone
2012-10-13 17:03:28 -07:00
parent 048feb1316
commit 3c17bad743

View File

@ -19,6 +19,7 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
#include "usb.h"
#include "usb_request.h" #include "usb_request.h"
#include <stdbool.h> #include <stdbool.h>
@ -49,6 +50,9 @@ static void usb_request(
if( handler ) { if( handler ) {
handler(endpoint, stage); handler(endpoint, stage);
} else {
// USB 2.0 section 9.2.7 "Request Error"
usb_endpoint_stall(endpoint);
} }
} }