summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/usbstack/usb_core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c
index 5de892196d..738b92ed4d 100644
--- a/firmware/usbstack/usb_core.c
+++ b/firmware/usbstack/usb_core.c
@@ -729,6 +729,8 @@ static void usb_core_do_clear_feature(int recip, int recip_nr, int feature)
729 729
730static void request_handler_device(struct usb_ctrlrequest* req, void* reqdata) 730static void request_handler_device(struct usb_ctrlrequest* req, void* reqdata)
731{ 731{
732 unsigned address;
733
732 switch(req->bRequest) { 734 switch(req->bRequest) {
733 case USB_REQ_GET_CONFIGURATION: 735 case USB_REQ_GET_CONFIGURATION:
734 logf("usb_core: GET_CONFIG"); 736 logf("usb_core: GET_CONFIG");
@@ -744,10 +746,11 @@ static void request_handler_device(struct usb_ctrlrequest* req, void* reqdata)
744 /* NOTE: We really have no business handling this and drivers 746 /* NOTE: We really have no business handling this and drivers
745 * should just handle it themselves. We don't care beyond 747 * should just handle it themselves. We don't care beyond
746 * knowing if we've been assigned an address yet, or not. */ 748 * knowing if we've been assigned an address yet, or not. */
749 address = req->wValue;
747 usb_drv_control_response(USB_CONTROL_ACK, NULL, 0); 750 usb_drv_control_response(USB_CONTROL_ACK, NULL, 0);
748 usb_drv_cancel_all_transfers(); 751 usb_drv_cancel_all_transfers();
749 usb_drv_set_address(req->wValue); 752 usb_drv_set_address(address);
750 usb_core_do_set_addr(req->wValue); 753 usb_core_do_set_addr(address);
751 break; 754 break;
752 case USB_REQ_GET_DESCRIPTOR: 755 case USB_REQ_GET_DESCRIPTOR:
753 logf("usb_core: GET_DESC %d", req->wValue >> 8); 756 logf("usb_core: GET_DESC %d", req->wValue >> 8);