summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-02-17 01:16:18 +0000
committerDave Chapman <dave@dchapman.com>2006-02-17 01:16:18 +0000
commit57654d443b36aff374c6a92a29654f8398022146 (patch)
treef486ed300376a93572d4dad88d18a318f79fa9ee /firmware
parentbd203e02cbac02752c49d67b95c65bc90afbd212 (diff)
downloadrockbox-57654d443b36aff374c6a92a29654f8398022146.tar.gz
rockbox-57654d443b36aff374c6a92a29654f8398022146.tar.bz2
rockbox-57654d443b36aff374c6a92a29654f8398022146.zip
iPod 5G: Change USB detection to use pin 1 on GPIOB instead of the USB status register. One user reported that USB_STATUS was giving false positives, and never changing when USB was inserted/removed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8713 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/usb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index 1c90d63519..c71111a548 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -404,8 +404,12 @@ bool usb_detect(void)
if (USB2D_IDENT != 0x22FA05) {
return false;
}
+#ifdef APPLE_IPODVIDEO
+ current_status = (GPIOB_INPUT_VAL & 0x01)?false:true;
+#else
current_status = (USB_STATUS & 0x800)?true:false;
#endif
+#endif
#ifdef USB_ISP1582
/* TODO: Implement USB_ISP1582 */
current_status = false;