Fix IPod 3G USB Recognition Problem
Allow IPod 3rd generation to recognize when USB is connected and reboot into disk mode. This problem is listed at the bottom of the Ipod status page https://www.rockbox.org/wiki/IpodStatus Change-Id: I8f32afd065d3a91cddc56fe63454bd082bfa29b9
This commit is contained in:
parent
5e72616618
commit
fbe557d432
2 changed files with 12 additions and 5 deletions
|
@ -696,6 +696,7 @@ Adrián Tinoco
|
||||||
Boris Kovačević
|
Boris Kovačević
|
||||||
Stéphane Moutard-Martin
|
Stéphane Moutard-Martin
|
||||||
Rune Pade
|
Rune Pade
|
||||||
|
Michael Rey
|
||||||
|
|
||||||
The libmad team
|
The libmad team
|
||||||
The wavpack team
|
The wavpack team
|
||||||
|
|
|
@ -28,12 +28,14 @@
|
||||||
|
|
||||||
void usb_pin_init(void)
|
void usb_pin_init(void)
|
||||||
{
|
{
|
||||||
/* TODO: add USB init for iPod 3rd gen */
|
#if defined(IPOD_1G2G)
|
||||||
|
|
||||||
#if defined(IPOD_1G2G) || defined(IPOD_3G)
|
|
||||||
/* GPIO C bit 7 is firewire detect */
|
/* GPIO C bit 7 is firewire detect */
|
||||||
GPIOC_ENABLE |= 0x80;
|
GPIOC_ENABLE |= 0x80;
|
||||||
GPIOC_OUTPUT_EN &= ~0x80;
|
GPIOC_OUTPUT_EN &= ~0x80;
|
||||||
|
#elif defined(IPOD_3G)
|
||||||
|
/* GPIO D bit 4 is USB detect */
|
||||||
|
GPIOD_ENABLE |= 0x10;
|
||||||
|
GPIOD_OUTPUT_EN &= ~0x10;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,13 +64,17 @@ void usb_enable(bool on)
|
||||||
|
|
||||||
int usb_detect(void)
|
int usb_detect(void)
|
||||||
{
|
{
|
||||||
#if defined(IPOD_1G2G) || defined(IPOD_3G)
|
#if defined(IPOD_1G2G)
|
||||||
/* GPIO C bit 7 is firewire detect */
|
/* GPIO C bit 7 is firewire detect */
|
||||||
if (!(GPIOC_INPUT_VAL & 0x80))
|
if (!(GPIOC_INPUT_VAL & 0x80))
|
||||||
return USB_INSERTED;
|
return USB_INSERTED;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* TODO: add USB detection for iPod 3rd gen */
|
#if defined(IPOD_3G)
|
||||||
|
/* GPIO D bit 4 is USB detect */
|
||||||
|
if (GPIOD_INPUT_VAL & 0x10)
|
||||||
|
return USB_INSERTED;
|
||||||
|
#endif
|
||||||
|
|
||||||
return USB_EXTRACTED;
|
return USB_EXTRACTED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue