diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2007-09-17 22:23:51 +0000 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2007-09-17 22:23:51 +0000 |
commit | 689d5fd4462c8b2069278e9c1c7ee054aae0b946 (patch) | |
tree | 2f67f6fbc0744fc29141695e6a9f946739c1f4ea /firmware/drivers/usb | |
parent | b409b05e1e2c04ffa712b5b5d72c95f84098e949 (diff) | |
download | rockbox-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
Diffstat (limited to 'firmware/drivers/usb')
-rw-r--r-- | firmware/drivers/usb/arcotg_dcd.c | 15 |
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; | |||
53 | /* description of our device driver operations */ | 53 | /* description of our device driver operations */ |
54 | struct usb_dcd_controller_ops arotg_dcd_ops = { | 54 | struct usb_dcd_controller_ops arotg_dcd_ops = { |
55 | .enable = usb_arcotg_dcd_enable, | 55 | .enable = usb_arcotg_dcd_enable, |
56 | .disable = NULL, | 56 | .disable = usb_arcotg_dcd_disable, |
57 | .set_halt = usb_arcotg_dcd_set_halt, | 57 | .set_halt = usb_arcotg_dcd_set_halt, |
58 | .send = usb_arcotg_dcd_send, | 58 | .send = usb_arcotg_dcd_send, |
59 | .receive = usb_arcotg_dcd_receive, | 59 | .receive = usb_arcotg_dcd_receive, |
@@ -693,6 +693,19 @@ int usb_arcotg_dcd_enable(struct usb_ep* ep, | |||
693 | return retval; | 693 | return retval; |
694 | } | 694 | } |
695 | 695 | ||
696 | int usb_arcotg_dcd_disable(struct usb_ep* ep) | ||
697 | { | ||
698 | if (ep == NULL || ep->desc == NULL) { | ||
699 | logf("failed to disabled %s", ep ? ep->name : NULL); | ||
700 | return -EINVAL; | ||
701 | } | ||
702 | |||
703 | ep->desc = NULL; | ||
704 | |||
705 | logf("disabled %s", ep->name); | ||
706 | return 0; | ||
707 | } | ||
708 | |||
696 | int usb_arcotg_dcd_set_halt(struct usb_ep* ep, bool halt) | 709 | int usb_arcotg_dcd_set_halt(struct usb_ep* ep, bool halt) |
697 | { | 710 | { |
698 | int status = -EOPNOTSUPP; /* operation not supported */ | 711 | int status = -EOPNOTSUPP; /* operation not supported */ |