summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2008-12-30 21:56:23 +0000
committerBjörn Stenberg <bjorn@haxx.se>2008-12-30 21:56:23 +0000
commitf59724414bd241509d8f6950fa4b5465a3f26c8e (patch)
tree1c61e2976a342396db9f306370e201347efb2d29 /firmware
parent93afe5297b825d1e6f9d3d2782ae00a4593a0a03 (diff)
Fixed m200v4 red build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19616 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/usb-as3525.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/usb-as3525.c b/firmware/target/arm/as3525/usb-as3525.c
index 9fcf2cb2f3..a10f8a441a 100644
--- a/firmware/target/arm/as3525/usb-as3525.c
+++ b/firmware/target/arm/as3525/usb-as3525.c
@@ -41,13 +41,17 @@ void usb_enable(bool on)
void usb_init_device(void)
{
+#ifdef USB_DETECT_PIN
GPIOA_DIR &= ~(1 << USB_DETECT_PIN); /* set as input */
+#endif
}
int usb_detect(void)
{
+#ifdef USB_DETECT_PIN
if (GPIOA_PIN( USB_DETECT_PIN ))
return USB_INSERTED;
else
+#endif
return USB_EXTRACTED;
}