From c762926b68f6a6c7f1e71b8acf9b1dd29d6e481f Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 10 Jun 2012 16:31:03 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4265 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/serial_usb.c | 8 ++++++++ os/hal/src/usb.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'os/hal/src') diff --git a/os/hal/src/serial_usb.c b/os/hal/src/serial_usb.c index 2c7a37b4d..7f1658812 100644 --- a/os/hal/src/serial_usb.c +++ b/os/hal/src/serial_usb.c @@ -119,6 +119,7 @@ static const struct SerialUSBDriverVMT vmt = { static void inotify(GenericQueue *qp) { SerialUSBDriver *sdup = (SerialUSBDriver *)qp->q_wrptr; +#if 0 /* Writes to the input queue can only happen when the queue has been emptied, then a whole packet is loaded in the queue.*/ if (!usbGetReceiveStatusI(sdup->config->usbp, USB_CDC_DATA_AVAILABLE_EP) && @@ -139,6 +140,7 @@ static void inotify(GenericQueue *qp) { while (notempty(&sdup->iqueue.q_waiting)) chSchReadyI(fifo_remove(&sdup->iqueue.q_waiting))->p_u.rdymsg = Q_OK; } +#endif } /** @@ -148,6 +150,7 @@ static void onotify(GenericQueue *qp) { SerialUSBDriver *sdup = (SerialUSBDriver *)qp->q_rdptr; size_t n; +#if 0 /* If there is any data in the output queue then it is sent within a single packet and the queue is emptied.*/ n = chOQGetFullI(&sdup->oqueue); @@ -166,6 +169,7 @@ static void onotify(GenericQueue *qp) { while (notempty(&sdup->oqueue.q_waiting)) chSchReadyI(fifo_remove(&sdup->oqueue.q_waiting))->p_u.rdymsg = Q_OK; } +#endif } /*===========================================================================*/ @@ -298,6 +302,7 @@ void sduDataTransmitted(USBDriver *usbp, usbep_t ep) { SerialUSBDriver *sdup = usbp->param; size_t n; +#if 0 chSysLockFromIsr(); /* If there is any data in the output queue then it is sent within a single packet and the queue is emptied.*/ @@ -319,6 +324,7 @@ void sduDataTransmitted(USBDriver *usbp, usbep_t ep) { chSchReadyI(fifo_remove(&sdup->oqueue.q_waiting))->p_u.rdymsg = Q_OK; } chSysUnlockFromIsr(); +#endif } /** @@ -332,6 +338,7 @@ void sduDataTransmitted(USBDriver *usbp, usbep_t ep) { void sduDataReceived(USBDriver *usbp, usbep_t ep) { SerialUSBDriver *sdup = usbp->param; +#if 0 chSysLockFromIsr(); /* Writes to the input queue can only happen when the queue has been emptied, then a whole packet is loaded in the queue.*/ @@ -355,6 +362,7 @@ void sduDataReceived(USBDriver *usbp, usbep_t ep) { chSchReadyI(fifo_remove(&sdup->iqueue.q_waiting))->p_u.rdymsg = Q_OK; } chSysUnlockFromIsr(); +#endif } /** diff --git a/os/hal/src/usb.c b/os/hal/src/usb.c index 1927581f1..ceae24770 100644 --- a/os/hal/src/usb.c +++ b/os/hal/src/usb.c @@ -313,10 +313,10 @@ 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->ep_mode & USB_EP_MODE_PACKET)) { memset(epcp->in_state, 0, sizeof(USBInEndpointState)); memset(epcp->out_state, 0, sizeof(USBOutEndpointState)); - } +// } usbp->epc[ep] = epcp; /* Low level endpoint activation.*/ -- cgit v1.2.3