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
This commit is contained in:
Aidan MacDonald 2021-09-19 10:54:26 +01:00
parent 99f333c64f
commit 672bbe434b
16 changed files with 36 additions and 38 deletions

View file

@ -869,7 +869,7 @@ int usb_drv_send(int endpoint, void* ptr, int length)
/* This function begins a receive (on an OUT endpoint), it should not block
* so the actual receive is done in the interrupt handler.
*/
int usb_drv_recv(int endpoint, void* ptr, int length)
int usb_drv_recv_nonblocking(int endpoint, void* ptr, int length)
{
return mxx_queue(endpoint, ptr, length, false, false);
}