mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 05:32:40 -05:00
Only return USB_POWERED if USB_DETECT_BY_DRV is actually defined, which might not be the case for e.g. bootloaders (also fix red)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28820 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ecd80d888e
commit
866a822ac6
1 changed files with 4 additions and 1 deletions
|
|
@ -68,11 +68,14 @@ int usb_detect(void)
|
||||||
* hardware power off (pressing the power button) doesn't work anymore
|
* hardware power off (pressing the power button) doesn't work anymore
|
||||||
* TODO: Implement USB in rockbox for these players */
|
* TODO: Implement USB in rockbox for these players */
|
||||||
return USB_EXTRACTED;
|
return USB_EXTRACTED;
|
||||||
#endif
|
#elif defined(USB_DETECT_BY_DRV)
|
||||||
if(bus_activity && connected)
|
if(bus_activity && connected)
|
||||||
return USB_INSERTED;
|
return USB_INSERTED;
|
||||||
else if(connected)
|
else if(connected)
|
||||||
return USB_POWERED;
|
return USB_POWERED;
|
||||||
else
|
else
|
||||||
return USB_EXTRACTED;
|
return USB_EXTRACTED;
|
||||||
|
#else
|
||||||
|
return connected?USB_INSERTED:USB_EXTRACTED;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue