diff options
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 */ |