diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/usb.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/usb.c b/firmware/usb.c index 5584d91ea0..181b1ead1a 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "config.h" | 19 | #include "config.h" |
20 | #include "sh7034.h" | 20 | #include "cpu.h" |
21 | #include "kernel.h" | 21 | #include "kernel.h" |
22 | #include "thread.h" | 22 | #include "thread.h" |
23 | #include "system.h" | 23 | #include "system.h" |
@@ -301,7 +301,9 @@ bool usb_detect(void) | |||
301 | #ifdef USB_PLAYERSTYLE | 301 | #ifdef USB_PLAYERSTYLE |
302 | current_status = (PADR & 0x8000)?false:true; | 302 | current_status = (PADR & 0x8000)?false:true; |
303 | #endif | 303 | #endif |
304 | 304 | #ifdef IRIVER_H100 | |
305 | current_status = (GPIO1_READ & 0x80)?true:false; | ||
306 | #endif | ||
305 | return current_status; | 307 | return current_status; |
306 | } | 308 | } |
307 | 309 | ||
@@ -358,6 +360,10 @@ void usb_init(void) | |||
358 | usb_monitor_enabled = false; | 360 | usb_monitor_enabled = false; |
359 | countdown = -1; | 361 | countdown = -1; |
360 | 362 | ||
363 | #ifdef IRIVER_H100 | ||
364 | GPIO1_FUNCTION |= 0x80; /* GPIO39 is the USB detect input */ | ||
365 | #endif | ||
366 | |||
361 | usb_enable(false); | 367 | usb_enable(false); |
362 | 368 | ||
363 | /* We assume that the USB cable is extracted */ | 369 | /* We assume that the USB cable is extracted */ |