summaryrefslogtreecommitdiff
path: root/firmware/usbstack/usb_hid.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_hid.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_hid.c')
-rw-r--r--firmware/usbstack/usb_hid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/usbstack/usb_hid.c b/firmware/usbstack/usb_hid.c
index 885ae4c24a..16dddb7db1 100644
--- a/firmware/usbstack/usb_hid.c
+++ b/firmware/usbstack/usb_hid.c
@@ -693,7 +693,7 @@ static int usb_hid_set_report(struct usb_ctrlrequest *req)
}
memset(buf, 0, length);
- usb_drv_recv(EP_CONTROL, buf, length);
+ usb_drv_recv_nonblocking(EP_CONTROL, buf, length);
#ifdef LOGF_ENABLE
if (buf[1] & 0x01)
@@ -772,7 +772,7 @@ bool usb_hid_control_request(struct usb_ctrlrequest *req, unsigned char *dest)
if (dest != orig_dest)
{
- usb_drv_recv(EP_CONTROL, NULL, 0); /* ack */
+ usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0); /* ack */
usb_drv_send(EP_CONTROL, orig_dest, dest - orig_dest);
return true;
}
@@ -809,7 +809,7 @@ bool usb_hid_control_request(struct usb_ctrlrequest *req, unsigned char *dest)
if (dest != orig_dest)
{
- usb_drv_recv(EP_CONTROL, NULL, 0); /* ack */
+ usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0); /* ack */
usb_drv_send(EP_CONTROL, orig_dest, dest - orig_dest);
}
else