summaryrefslogtreecommitdiff
path: root/firmware/usbstack/usb_core.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2021-09-19 10:54:26 +0100
committerAidan MacDonald <amachronic@protonmail.com>2021-09-20 22:41:29 +0100
commit672bbe434b12d4730cf270f7245753fb98cf162d (patch)
tree3fdaa08ddc41f942336c968bb169e8806c7c3fa8 /firmware/usbstack/usb_core.c
parent99f333c64f13c3f9a62b9f5e184ae87f053bf65a (diff)
usb: rename usb_drv_recv() to usb_recv_recv_nonblocking()
IMHO the current name is somewhat misleading: - usb_drv_send() is blocking and we have usb_drv_send_nonblocking() for the non-blocking case. This inconsistent naming can only promote confusion. (And what would we call a blocking receive?) - Other hardware abstraction APIs in Rockbox are usually blocking: storage, LCD, backlight, audio... in other words, blocking is the default expected behavior, with non-blocking calls being a rarity. Change-Id: I05b41088d09eab582697674f4f06fdca0c8950af
Diffstat (limited to 'firmware/usbstack/usb_core.c')
-rw-r--r--firmware/usbstack/usb_core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c
index b291dc7655..bf73c58abc 100644
--- a/firmware/usbstack/usb_core.c
+++ b/firmware/usbstack/usb_core.c
@@ -674,7 +674,7 @@ static void request_handler_device_get_descriptor(struct usb_ctrlrequest* req)
if (ptr != response_data)
memcpy(response_data, ptr, length);
- usb_drv_recv(EP_CONTROL, NULL, 0);
+ usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0);
usb_drv_send(EP_CONTROL, response_data, length);
}
}
@@ -725,7 +725,7 @@ static void request_handler_device(struct usb_ctrlrequest* req)
case USB_REQ_GET_CONFIGURATION: {
logf("usb_core: GET_CONFIG");
response_data[0] = (usb_state == ADDRESS ? 0 : 1);
- usb_drv_recv(EP_CONTROL, NULL, 0);
+ usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0);
usb_drv_send(EP_CONTROL, response_data, 1);
break;
}
@@ -759,7 +759,7 @@ static void request_handler_device(struct usb_ctrlrequest* req)
case USB_REQ_GET_STATUS:
response_data[0] = 0;
response_data[1] = 0;
- usb_drv_recv(EP_CONTROL, NULL, 0);
+ usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0);
usb_drv_send(EP_CONTROL, response_data, 2);
break;
default:
@@ -781,7 +781,7 @@ static void request_handler_interface_standard(struct usb_ctrlrequest* req)
case USB_REQ_GET_INTERFACE:
logf("usb_core: GET_INTERFACE");
response_data[0] = 0;
- usb_drv_recv(EP_CONTROL, NULL, 0);
+ usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0);
usb_drv_send(EP_CONTROL, response_data, 1);
break;
case USB_REQ_CLEAR_FEATURE:
@@ -791,7 +791,7 @@ static void request_handler_interface_standard(struct usb_ctrlrequest* req)
case USB_REQ_GET_STATUS:
response_data[0] = 0;
response_data[1] = 0;
- usb_drv_recv(EP_CONTROL, NULL, 0);
+ usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0);
usb_drv_send(EP_CONTROL, response_data, 2);
break;
default:
@@ -860,7 +860,7 @@ static void request_handler_endpoint_standard(struct usb_ctrlrequest* req)
response_data[0] = usb_drv_stalled(EP_NUM(req->wIndex),
EP_DIR(req->wIndex));
- usb_drv_recv(EP_CONTROL, NULL, 0);
+ usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0);
usb_drv_send(EP_CONTROL, response_data, 2);
break;
default: