Fixed m200v4 red build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19616 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2008-12-30 21:56:23 +00:00
parent 93afe5297b
commit f59724414b

View file

@ -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;
}