mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Remove usb_drv_wait from the public usb api, and remove the implementation from usb-drv-arc.c, as it is not actually used
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19275 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b9c49fd474
commit
f235f1d4c0
3 changed files with 15 additions and 27 deletions
|
|
@ -545,6 +545,21 @@ int usb_drv_send_nonblocking(int ep, void* ptr, int length)
|
|||
return usb_drv_send(ep, ptr, length);
|
||||
}
|
||||
|
||||
static void usb_drv_wait(int ep, bool send)
|
||||
{
|
||||
logf("usb_drv_wait(%d, %d)", ep, send);
|
||||
if(send)
|
||||
{
|
||||
while (endpoints[ep].out_in_progress)
|
||||
nop_f();
|
||||
}
|
||||
else
|
||||
{
|
||||
while (endpoints[ep].in_ack)
|
||||
nop_f();
|
||||
}
|
||||
}
|
||||
|
||||
int usb_drv_send(int ep, void* ptr, int length)
|
||||
{
|
||||
logf("usb_drv_send_nb(%d, 0x%x, %d)", ep, &ptr, length);
|
||||
|
|
@ -578,21 +593,6 @@ void usb_drv_reset_endpoint(int ep, bool send)
|
|||
usb_enable_endpoint(ep_index(ep, (int)send));
|
||||
}
|
||||
|
||||
void usb_drv_wait(int ep, bool send)
|
||||
{
|
||||
logf("usb_drv_wait(%d, %d)", ep, send);
|
||||
if(send)
|
||||
{
|
||||
while (endpoints[ep].out_in_progress)
|
||||
nop_f();
|
||||
}
|
||||
else
|
||||
{
|
||||
while (endpoints[ep].in_ack)
|
||||
nop_f();
|
||||
}
|
||||
}
|
||||
|
||||
void usb_drv_cancel_all_transfers(void)
|
||||
{
|
||||
logf("usb_drv_cancel_all_tranfers()");
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ int usb_drv_recv(int endpoint, void* ptr, int length);
|
|||
void usb_drv_ack(struct usb_ctrlrequest* req);
|
||||
void usb_drv_set_address(int address);
|
||||
void usb_drv_reset_endpoint(int endpoint, bool send);
|
||||
void usb_drv_wait(int endpoint, bool send);
|
||||
bool usb_drv_powered(void);
|
||||
int usb_drv_port_speed(void);
|
||||
void usb_drv_cancel_all_transfers(void);
|
||||
|
|
|
|||
|
|
@ -581,17 +581,6 @@ int usb_drv_recv(int endpoint, void* ptr, int length)
|
|||
return prime_transfer(endpoint&0x7f, ptr, length, false, false);
|
||||
}
|
||||
|
||||
void usb_drv_wait(int endpoint, bool send)
|
||||
{
|
||||
int pipe = (endpoint&0x7f) * 2 + (send ? 1 : 0);
|
||||
struct queue_head* qh = &qh_array[pipe];
|
||||
|
||||
while (qh->dtd.size_ioc_sts & QH_STATUS_ACTIVE) {
|
||||
if (REG_USBSTS & USBSTS_RESET)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int usb_drv_port_speed(void)
|
||||
{
|
||||
return (REG_PORTSC1 & 0x08000000) ? 1 : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue