summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2008-12-13 14:49:44 +0000
committerFrank Gevaerts <frank@gevaerts.be>2008-12-13 14:49:44 +0000
commit19dfe330a1e48800a3f3ee73b9d1ee9266e87e2a (patch)
treeb63b8a138edf6364ed6e47acc61cc0e71b92a4e9 /firmware
parente2b69ddffb9e731ef6c1bb1b704fe9038e999817 (diff)
downloadrockbox-19dfe330a1e48800a3f3ee73b9d1ee9266e87e2a.tar.gz
rockbox-19dfe330a1e48800a3f3ee73b9d1ee9266e87e2a.tar.bz2
rockbox-19dfe330a1e48800a3f3ee73b9d1ee9266e87e2a.zip
Add a disconnect handler for usb storage. It doesn't do anything yet, but it will apparently be needed to reset the audio buffer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19418 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/usbstack/usb_core.c2
-rw-r--r--firmware/usbstack/usb_storage.c5
-rw-r--r--firmware/usbstack/usb_storage.h1
3 files changed, 7 insertions, 1 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c
index 72900d830f..ea5d6590f6 100644
--- a/firmware/usbstack/usb_core.c
+++ b/firmware/usbstack/usb_core.c
@@ -187,7 +187,7 @@ static struct usb_class_driver drivers[USB_NUM_DRIVERS] =
.get_config_descriptor = usb_storage_get_config_descriptor,
.init_connection = usb_storage_init_connection,
.init = usb_storage_init,
- .disconnect = NULL,
+ .disconnect = usb_storage_disconnect,
.transfer_complete = usb_storage_transfer_complete,
.control_request = usb_storage_control_request,
#ifdef HAVE_HOTSWAP
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index 5e97796db0..475bd4c00a 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -418,6 +418,11 @@ void usb_storage_init_connection(void)
usb_drv_recv(ep_out, tb.transfer_buffer, 1024);
}
+void usb_storage_disconnect(void)
+{
+ /* Empty for now */
+}
+
/* called by usb_core_transfer_complete() */
void usb_storage_transfer_complete(int ep,int dir,int status,int length)
{
diff --git a/firmware/usbstack/usb_storage.h b/firmware/usbstack/usb_storage.h
index 4c89039bfd..8344419770 100644
--- a/firmware/usbstack/usb_storage.h
+++ b/firmware/usbstack/usb_storage.h
@@ -27,6 +27,7 @@ int usb_storage_request_endpoints(struct usb_class_driver *);
int usb_storage_set_first_interface(int interface);
int usb_storage_get_config_descriptor(unsigned char *dest,int max_packet_size);
void usb_storage_init_connection(void);
+void usb_storage_disconnect(void);
void usb_storage_init(void);
void usb_storage_transfer_complete(int ep,int dir,int state,int length);
bool usb_storage_control_request(struct usb_ctrlrequest* req);