summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/screens.c2
-rwxr-xr-xbootloader/mrobe500.c12
-rw-r--r--flash/bootbox/main.c4
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)
button = get_action(CONTEXT_STD,HZ/3);
if (button == ACTION_STD_OK)
rc = 2;
- else if (usb_detect())
+ else if (usb_detect() == USB_INSERTED)
rc = 3;
else if (!charger_inserted())
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 @@
*
* Copyright (C) 2007 by Karl Kurbjun
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
@@ -220,7 +220,7 @@ void main(void)
usb_init();
/* Enter USB mode without USB thread */
- if(usb_detect())
+ if(usb_detect() == USB_INSERTED)
{
const char msg[] = "Bootloader USB mode";
reset_screen();
@@ -233,7 +233,7 @@ void main(void)
sleep(HZ/20);
usb_enable(true);
- while (usb_detect())
+ while (usb_detect() == USB_INSERTED)
{
ata_spin(); /* Prevent the drive from spinning down */
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)
break; /* start */
else
{
- if (usb_detect())
+ if (usb_detect() == USB_INSERTED)
break;
else if (!charger_inserted())
power_off(); /* charger removed: power down */
@@ -192,7 +192,7 @@ void main(void)
//disk_init();
usb_start_monitoring();
- while (usb_detect())
+ while (usb_detect() == USB_INSERTED)
{ /* enter USB mode early, before trying to mount */
if (button_get_w_tmo(HZ/10) == SYS_USB_CONNECTED)
{