summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2007-09-17 22:23:51 +0000
committerChristian Gmeiner <christian.gmeiner@gmail.com>2007-09-17 22:23:51 +0000
commit689d5fd4462c8b2069278e9c1c7ee054aae0b946 (patch)
tree2f67f6fbc0744fc29141695e6a9f946739c1f4ea
parentb409b05e1e2c04ffa712b5b5d72c95f84098e949 (diff)
downloadrockbox-689d5fd4462c8b2069278e9c1c7ee054aae0b946.tar.gz
rockbox-689d5fd4462c8b2069278e9c1c7ee054aae0b946.zip
implement usb_arcotg_dcd_disable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14739 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/usb/arcotg_dcd.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/firmware/drivers/usb/arcotg_dcd.c b/firmware/drivers/usb/arcotg_dcd.c
index 45b31143e6..b08f7eef58 100644
--- a/firmware/drivers/usb/arcotg_dcd.c
+++ b/firmware/drivers/usb/arcotg_dcd.c
@@ -53,7 +53,7 @@ unsigned char buffer[BUFFER_SIZE] IBSS_ATTR;
/* description of our device driver operations */
struct usb_dcd_controller_ops arotg_dcd_ops = {
.enable = usb_arcotg_dcd_enable,
- .disable = NULL,
+ .disable = usb_arcotg_dcd_disable,
.set_halt = usb_arcotg_dcd_set_halt,
.send = usb_arcotg_dcd_send,
.receive = usb_arcotg_dcd_receive,
@@ -693,6 +693,19 @@ int usb_arcotg_dcd_enable(struct usb_ep* ep,
return retval;
}
+int usb_arcotg_dcd_disable(struct usb_ep* ep)
+{
+ if (ep == NULL || ep->desc == NULL) {
+ logf("failed to disabled %s", ep ? ep->name : NULL);
+ return -EINVAL;
+ }
+
+ ep->desc = NULL;
+
+ logf("disabled %s", ep->name);
+ return 0;
+}
+
int usb_arcotg_dcd_set_halt(struct usb_ep* ep, bool halt)
{
int status = -EOPNOTSUPP; /* operation not supported */