summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-04-03 05:42:54 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-04-03 05:42:54 +0000
commit722be53bf9f8cb39076b48b1cb8b3eaede047546 (patch)
tree10a7581e146f69960367ddb4a20e2b40608c980f
parentd3bad5b1ca3e4dfce9f5586b7d2c8392d8c307fc (diff)
as3525v2: acknowledge USB connection/deconnection in SD thread
Fuzev2: detect USB connection and reboot to OF git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25446 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c4
-rw-r--r--firmware/target/arm/as3525/usb-as3525.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 9dd1d7e7e6..4ca5fbc164 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -39,6 +39,7 @@
#include "stdbool.h"
#include "ata_idle_notify.h"
#include "sd.h"
+#include "usb.h"
#ifdef HAVE_HOTSWAP
#include "disk.h"
@@ -608,7 +609,7 @@ static void sd_thread(void)
}
}
break;
-#if 0
+
case SYS_USB_CONNECTED:
usb_acknowledge(SYS_USB_CONNECTED_ACK);
/* Wait until the USB cable is extracted again */
@@ -618,7 +619,6 @@ static void sd_thread(void)
case SYS_USB_DISCONNECTED:
usb_acknowledge(SYS_USB_DISCONNECTED_ACK);
break;
-#endif
}
}
}
diff --git a/firmware/target/arm/as3525/usb-as3525.c b/firmware/target/arm/as3525/usb-as3525.c
index 92257f6a21..088b635104 100644
--- a/firmware/target/arm/as3525/usb-as3525.c
+++ b/firmware/target/arm/as3525/usb-as3525.c
@@ -31,6 +31,10 @@
#if CONFIG_CPU == AS3525
static int usb_status = USB_EXTRACTED;
+#else
+#ifdef SANSA_FUZEV2
+#define USB_DETECT_PIN 3
+#endif
#endif
void usb_enable(bool on)