summaryrefslogtreecommitdiff
path: root/bootloader/main-pp.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-01-16 00:21:54 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-01-16 00:21:54 +0000
commitd0178ba01ce5771d0f59b684baae2de27e70c695 (patch)
treeeea400039bae8c9c24708855e665dd4951067322 /bootloader/main-pp.c
parentbb54c8f31556db650f3e89605c699dd41cc2ed52 (diff)
Display messages only when entering USB mode in Portal Player bootloader to keep timed-out charger-only connects going into verbose mode.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29060 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/main-pp.c')
-rw-r--r--bootloader/main-pp.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c
index 5bf4e4cf4d..67c1d765aa 100644
--- a/bootloader/main-pp.c
+++ b/bootloader/main-pp.c
@@ -470,13 +470,6 @@ static int handle_usb(int connect_timeout)
usb_init();
usb_start_monitoring();
- /* Switch to verbose mode if not in it so that the status updates
- * are shown */
-
- /* TODO: Should we forgo any messages except the connect? It might be a
- * charger, not a USB host. */
- verbose = true;
-
printf("USB: Connecting");
if (connect_timeout != TIMEOUT_BLOCK)
@@ -489,6 +482,9 @@ static int handle_usb(int connect_timeout)
if (ev.id == SYS_USB_CONNECTED)
{
+ /* Switch to verbose mode if not in it so that the status updates
+ * are shown */
+ verbose = true;
/* Got the message - wait for disconnect */
printf("Bootloader USB mode");
@@ -501,7 +497,9 @@ static int handle_usb(int connect_timeout)
if (connect_timeout != TIMEOUT_BLOCK &&
TIME_AFTER(current_tick, end_tick))
{
- /* Timed out waiting for the connect */
+ /* Timed out waiting for the connect - will happen when connected
+ * to a charger instead of a host port and the charging pin is
+ * the same as the USB pin */
printf("USB: Timed out");
break;
}
@@ -598,10 +596,16 @@ void* main(void)
btn = button_read_device();
/* Enable bootloader messages if any button is pressed */
+#ifdef HAVE_BOOTLOADER_USB_MODE
+ lcd_clear_display();
+ if (btn)
+ verbose = true;
+#else
if (btn) {
lcd_clear_display();
verbose = true;
}
+#endif
lcd_setfont(FONT_SYSFIXED);