From a1e0033a544f9637b9eb80e132500cff977e2a0c Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Tue, 9 Nov 2021 06:56:23 -0700 Subject: [PATCH] Do not set USB device address to zero When setting the USB configuration to zero we should return from the configured state to the address state according to the USB specification. --- firmware/platform/lpc43xx/drivers/usb/usb_standard_request.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/firmware/platform/lpc43xx/drivers/usb/usb_standard_request.c b/firmware/platform/lpc43xx/drivers/usb/usb_standard_request.c index 5073673..748a3fd 100644 --- a/firmware/platform/lpc43xx/drivers/usb/usb_standard_request.c +++ b/firmware/platform/lpc43xx/drivers/usb/usb_standard_request.c @@ -233,10 +233,6 @@ static usb_request_status_t usb_standard_request_set_configuration_setup( ) { const uint8_t usb_configuration = endpoint->setup.value_l; if( usb_set_configuration(endpoint->device, usb_configuration) ) { - if( usb_configuration == 0 ) { - // TODO: Should this be done immediately? - usb_set_address_immediate(endpoint->device, 0); - } usb_transfer_schedule_ack(endpoint->in); return USB_REQUEST_STATUS_OK; } else {