Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: [PATCH] AMSv2: don't reboot on USB plug

[PATCH] AMSv2: don't reboot on USB plug

From: Rafaël Carré <rafael.carre_at_gmail.com>
Date: Mon, 16 Aug 2010 17:23:14 +0200

Users will have to reboot to OF manually or to power off, and then plug USB
No message is displayed because usb_detect() is run from a tick

This lacks documentation but should be OK for Unstable devices, and
will hopefully prevent clueless users from opening their devices and
breaking them definitely, instead of waiting for the battery to power
off.

---
 firmware/target/arm/as3525/usb-as3525.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/firmware/target/arm/as3525/usb-as3525.c b/firmware/target/arm/as3525/usb-as3525.c
index 524d8d2..61ceb74 100644
--- a/firmware/target/arm/as3525/usb-as3525.c
+++ b/firmware/target/arm/as3525/usb-as3525.c
@@ -55,5 +55,11 @@ void usb_remove_int(void)
 
 int usb_detect(void)
 {
+#if CONFIG_CPU == AS3525v2
+    /* Rebooting on USB plug can crash these players in a state where
+     * hardware power off (pressing the power button) doesn't work anymore
+     * TODO: Implement USB in rockbox for these players */
+    return USB_EXTRACTED;
+#endif
     return usb_status;
 }
-- 
1.7.2.1
Received on 2010-08-16

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa