From 988f244c74bd388c2ae9f615b3504f1461d93404 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Mon, 20 Sep 2021 02:11:07 +0100 Subject: [PATCH] usb: port usb_storage control request handling to new API Change-Id: I1a19e09fdc0f05473d53c39bab0761d5cb8f6ff0 --- firmware/usbstack/usb_storage.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index 717c2e5f22..b6b10d4633 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c @@ -687,8 +687,7 @@ bool usb_storage_control_request(struct usb_ctrlrequest* req, void* reqdata, uns if(skip_first) (*tb.max_lun) --; #endif logf("ums: getmaxlun"); - usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0); /* ack */ - usb_drv_send(EP_CONTROL, tb.max_lun, 1); + usb_drv_control_response(USB_CONTROL_ACK, tb.max_lun, 1); handled = true; break; } @@ -703,7 +702,7 @@ bool usb_storage_control_request(struct usb_ctrlrequest* req, void* reqdata, uns usb_drv_reset_endpoint(ep_in, false); usb_drv_reset_endpoint(ep_out, true); #endif - usb_drv_send(EP_CONTROL, NULL, 0); /* ack */ + usb_drv_control_response(USB_CONTROL_ACK, NULL, 0); handled = true; break; }