Proper USB detection for iRiver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5377 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a062b4a22c
commit
01530ac5c8
1 changed files with 8 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
#include "config.h"
|
||||
#include "sh7034.h"
|
||||
#include "cpu.h"
|
||||
#include "kernel.h"
|
||||
#include "thread.h"
|
||||
#include "system.h"
|
||||
|
@ -301,7 +301,9 @@ bool usb_detect(void)
|
|||
#ifdef USB_PLAYERSTYLE
|
||||
current_status = (PADR & 0x8000)?false:true;
|
||||
#endif
|
||||
|
||||
#ifdef IRIVER_H100
|
||||
current_status = (GPIO1_READ & 0x80)?true:false;
|
||||
#endif
|
||||
return current_status;
|
||||
}
|
||||
|
||||
|
@ -358,6 +360,10 @@ void usb_init(void)
|
|||
usb_monitor_enabled = false;
|
||||
countdown = -1;
|
||||
|
||||
#ifdef IRIVER_H100
|
||||
GPIO1_FUNCTION |= 0x80; /* GPIO39 is the USB detect input */
|
||||
#endif
|
||||
|
||||
usb_enable(false);
|
||||
|
||||
/* We assume that the USB cable is extracted */
|
||||
|
|
Loading…
Reference in a new issue