forked from len0rd/rockbox
Quick fix for ipod usb detect. (Charger detection coming later.)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15764 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1c38c75a22
commit
68b440346e
1 changed files with 5 additions and 3 deletions
|
@ -30,6 +30,7 @@
|
|||
#ifdef HAVE_USBSTACK
|
||||
#include "usb_core.h"
|
||||
#endif
|
||||
#include "usb_drv.h"
|
||||
|
||||
void usb_init_device(void)
|
||||
{
|
||||
|
@ -103,9 +104,7 @@ int usb_detect(void)
|
|||
/* GPIO C bit 1 is firewire detect */
|
||||
if (!(GPIOC_INPUT_VAL & 0x02))
|
||||
return USB_INSERTED;
|
||||
#endif
|
||||
|
||||
#if defined(SANSA_C200)
|
||||
#elif defined(SANSA_C200)
|
||||
/* GPIO H bit 1 is usb detect */
|
||||
if (GPIOH_INPUT_VAL & 0x02)
|
||||
return USB_INSERTED;
|
||||
|
@ -119,5 +118,8 @@ int usb_detect(void)
|
|||
return USB_INSERTED;
|
||||
#endif
|
||||
|
||||
if (usb_drv_powered())
|
||||
return USB_INSERTED;
|
||||
|
||||
return USB_EXTRACTED;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue