diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-07-06 12:14:13 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-07-06 12:14:13 +0000 |
commit | b1e16d21615397802930d66905d60fc6fee25b3d (patch) | |
tree | 6a41af0eb4cd4742f8300f4478c6b971e9d6c25a | |
parent | f2998a81f27f208d18da32d3bb54010136781eca (diff) | |
download | rockbox-b1e16d21615397802930d66905d60fc6fee25b3d.tar.gz rockbox-b1e16d21615397802930d66905d60fc6fee25b3d.zip |
Repair charging screen on archos. usb_detect() doesn't return a boolean since 2007-09-04. Fixed same problem in the m:robe 500 bootloader and in bootbox.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17955 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/screens.c | 2 | ||||
-rwxr-xr-x | bootloader/mrobe500.c | 12 | ||||
-rw-r--r-- | flash/bootbox/main.c | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/apps/screens.c b/apps/screens.c index 02c61a4f40..8560dadf23 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -373,7 +373,7 @@ int charging_screen(void) | |||
373 | button = get_action(CONTEXT_STD,HZ/3); | 373 | button = get_action(CONTEXT_STD,HZ/3); |
374 | if (button == ACTION_STD_OK) | 374 | if (button == ACTION_STD_OK) |
375 | rc = 2; | 375 | rc = 2; |
376 | else if (usb_detect()) | 376 | else if (usb_detect() == USB_INSERTED) |
377 | rc = 3; | 377 | rc = 3; |
378 | else if (!charger_inserted()) | 378 | else if (!charger_inserted()) |
379 | rc = 1; | 379 | rc = 1; |
diff --git a/bootloader/mrobe500.c b/bootloader/mrobe500.c index 59c8bc2141..ee46eb8eb4 100755 --- a/bootloader/mrobe500.c +++ b/bootloader/mrobe500.c | |||
@@ -9,10 +9,10 @@ | |||
9 | * | 9 | * |
10 | * Copyright (C) 2007 by Karl Kurbjun | 10 | * Copyright (C) 2007 by Karl Kurbjun |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or | 12 | * This program is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU General Public License | 13 | * modify it under the terms of the GNU General Public License |
14 | * as published by the Free Software Foundation; either version 2 | 14 | * as published by the Free Software Foundation; either version 2 |
15 | * of the License, or (at your option) any later version. | 15 | * of the License, or (at your option) any later version. |
16 | * | 16 | * |
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
18 | * KIND, either express or implied. | 18 | * KIND, either express or implied. |
@@ -220,7 +220,7 @@ void main(void) | |||
220 | usb_init(); | 220 | usb_init(); |
221 | 221 | ||
222 | /* Enter USB mode without USB thread */ | 222 | /* Enter USB mode without USB thread */ |
223 | if(usb_detect()) | 223 | if(usb_detect() == USB_INSERTED) |
224 | { | 224 | { |
225 | const char msg[] = "Bootloader USB mode"; | 225 | const char msg[] = "Bootloader USB mode"; |
226 | reset_screen(); | 226 | reset_screen(); |
@@ -233,7 +233,7 @@ void main(void) | |||
233 | sleep(HZ/20); | 233 | sleep(HZ/20); |
234 | usb_enable(true); | 234 | usb_enable(true); |
235 | 235 | ||
236 | while (usb_detect()) | 236 | while (usb_detect() == USB_INSERTED) |
237 | { | 237 | { |
238 | ata_spin(); /* Prevent the drive from spinning down */ | 238 | ata_spin(); /* Prevent the drive from spinning down */ |
239 | sleep(HZ); | 239 | sleep(HZ); |
diff --git a/flash/bootbox/main.c b/flash/bootbox/main.c index 037ffb0b84..96020c3d00 100644 --- a/flash/bootbox/main.c +++ b/flash/bootbox/main.c | |||
@@ -115,7 +115,7 @@ void charging_screen(void) | |||
115 | break; /* start */ | 115 | break; /* start */ |
116 | else | 116 | else |
117 | { | 117 | { |
118 | if (usb_detect()) | 118 | if (usb_detect() == USB_INSERTED) |
119 | break; | 119 | break; |
120 | else if (!charger_inserted()) | 120 | else if (!charger_inserted()) |
121 | power_off(); /* charger removed: power down */ | 121 | power_off(); /* charger removed: power down */ |
@@ -192,7 +192,7 @@ void main(void) | |||
192 | 192 | ||
193 | //disk_init(); | 193 | //disk_init(); |
194 | usb_start_monitoring(); | 194 | usb_start_monitoring(); |
195 | while (usb_detect()) | 195 | while (usb_detect() == USB_INSERTED) |
196 | { /* enter USB mode early, before trying to mount */ | 196 | { /* enter USB mode early, before trying to mount */ |
197 | if (button_get_w_tmo(HZ/10) == SYS_USB_CONNECTED) | 197 | if (button_get_w_tmo(HZ/10) == SYS_USB_CONNECTED) |
198 | { | 198 | { |