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
This commit is contained in:
Rafaël Carré 2010-04-03 05:42:54 +00:00
parent d3bad5b1ca
commit 722be53bf9
2 changed files with 6 additions and 2 deletions

View file

@ -39,6 +39,7 @@
#include "stdbool.h" #include "stdbool.h"
#include "ata_idle_notify.h" #include "ata_idle_notify.h"
#include "sd.h" #include "sd.h"
#include "usb.h"
#ifdef HAVE_HOTSWAP #ifdef HAVE_HOTSWAP
#include "disk.h" #include "disk.h"
@ -608,7 +609,7 @@ static void sd_thread(void)
} }
} }
break; break;
#if 0
case SYS_USB_CONNECTED: case SYS_USB_CONNECTED:
usb_acknowledge(SYS_USB_CONNECTED_ACK); usb_acknowledge(SYS_USB_CONNECTED_ACK);
/* Wait until the USB cable is extracted again */ /* Wait until the USB cable is extracted again */
@ -618,7 +619,6 @@ static void sd_thread(void)
case SYS_USB_DISCONNECTED: case SYS_USB_DISCONNECTED:
usb_acknowledge(SYS_USB_DISCONNECTED_ACK); usb_acknowledge(SYS_USB_DISCONNECTED_ACK);
break; break;
#endif
} }
} }
} }

View file

@ -31,6 +31,10 @@
#if CONFIG_CPU == AS3525 #if CONFIG_CPU == AS3525
static int usb_status = USB_EXTRACTED; static int usb_status = USB_EXTRACTED;
#else
#ifdef SANSA_FUZEV2
#define USB_DETECT_PIN 3
#endif
#endif #endif
void usb_enable(bool on) void usb_enable(bool on)