mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-13 07:02:31 -05:00
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
|
#ifdef HAVE_USBSTACK
|
||||||
#include "usb_core.h"
|
#include "usb_core.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "usb_drv.h"
|
||||||
|
|
||||||
void usb_init_device(void)
|
void usb_init_device(void)
|
||||||
{
|
{
|
||||||
|
|
@ -103,9 +104,7 @@ int usb_detect(void)
|
||||||
/* GPIO C bit 1 is firewire detect */
|
/* GPIO C bit 1 is firewire detect */
|
||||||
if (!(GPIOC_INPUT_VAL & 0x02))
|
if (!(GPIOC_INPUT_VAL & 0x02))
|
||||||
return USB_INSERTED;
|
return USB_INSERTED;
|
||||||
#endif
|
#elif defined(SANSA_C200)
|
||||||
|
|
||||||
#if defined(SANSA_C200)
|
|
||||||
/* GPIO H bit 1 is usb detect */
|
/* GPIO H bit 1 is usb detect */
|
||||||
if (GPIOH_INPUT_VAL & 0x02)
|
if (GPIOH_INPUT_VAL & 0x02)
|
||||||
return USB_INSERTED;
|
return USB_INSERTED;
|
||||||
|
|
@ -119,5 +118,8 @@ int usb_detect(void)
|
||||||
return USB_INSERTED;
|
return USB_INSERTED;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (usb_drv_powered())
|
||||||
|
return USB_INSERTED;
|
||||||
|
|
||||||
return USB_EXTRACTED;
|
return USB_EXTRACTED;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue