From c6914081835f10258d873af8526ae405ffe5b25c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 17 Jun 2012 06:53:49 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4283 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/usb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'os/hal/src') diff --git a/os/hal/src/usb.c b/os/hal/src/usb.c index ceae24770..fa79ea0c1 100644 --- a/os/hal/src/usb.c +++ b/os/hal/src/usb.c @@ -313,10 +313,11 @@ void usbInitEndpointI(USBDriver *usbp, usbep_t ep, "usbEnableEndpointI(), #2", "already initialized"); /* Logically enabling the endpoint in the USBDriver structure.*/ -// if (!(epcp->ep_mode & USB_EP_MODE_PACKET)) { + if (epcp->in_state != NULL) memset(epcp->in_state, 0, sizeof(USBInEndpointState)); + if (epcp->out_state != NULL) memset(epcp->out_state, 0, sizeof(USBOutEndpointState)); -// } + usbp->epc[ep] = epcp; /* Low level endpoint activation.*/ -- cgit v1.2.3