mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
usb-drv-as3525: use udelay() and not a C busy loop
Remove redundant "? true : false" git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26903 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b43e15fe57
commit
48313f58e3
1 changed files with 5 additions and 4 deletions
|
|
@ -366,10 +366,11 @@ void usb_attach(void)
|
|||
usb_enable(true);
|
||||
}
|
||||
|
||||
/* delay is in milliseconds */
|
||||
static inline void usb_delay(int delay)
|
||||
{ //TUNEME : delay is in milliseconds
|
||||
delay <<= 14;
|
||||
while(delay--) ;
|
||||
{
|
||||
while(delay--)
|
||||
udelay(1000);
|
||||
}
|
||||
|
||||
static void usb_phy_on(void)
|
||||
|
|
@ -1019,7 +1020,7 @@ void usb_drv_stall(int ep, bool stall, bool in)
|
|||
|
||||
bool usb_drv_stalled(int ep, bool in)
|
||||
{
|
||||
return USB_EP_CTRL(ep, in) & USB_EP_CTRL_STALL ? true : false;
|
||||
return USB_EP_CTRL(ep, in) & USB_EP_CTRL_STALL;
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue