From ec9736a27d1572f1a8357cae3dd56470f00af974 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 2 Jul 2012 18:47:09 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4388 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/serial_usb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/os/hal/src/serial_usb.c b/os/hal/src/serial_usb.c index c3e9ae184..fc082b56b 100644 --- a/os/hal/src/serial_usb.c +++ b/os/hal/src/serial_usb.c @@ -322,12 +322,12 @@ void sduDataTransmitted(USBDriver *usbp, usbep_t ep) { so it is safe to transmit without a check.*/ chSysUnlockFromIsr(); - usbPrepareQueuedTransmit(sdup->config->usbp, + usbPrepareQueuedTransmit(usbp, USB_CDC_DATA_REQUEST_EP, &sdup->oqueue, n); chSysLockFromIsr(); - usbStartTransmitI(sdup->config->usbp, USB_CDC_DATA_REQUEST_EP); + usbStartTransmitI(usbp, USB_CDC_DATA_REQUEST_EP); } chSysUnlockFromIsr(); @@ -352,19 +352,19 @@ void sduDataReceived(USBDriver *usbp, usbep_t ep) { /* Writes to the input queue can only happen when there is enough space to hold at least one packet.*/ - maxsize = sdup->config->usbp->epc[USB_CDC_DATA_AVAILABLE_EP]->out_maxsize; + maxsize = usbp->epc[USB_CDC_DATA_AVAILABLE_EP]->out_maxsize; if ((n = chIQGetEmptyI(&sdup->iqueue)) >= maxsize) { /* The endpoint cannot be busy, we are in the context of the callback, so a packet is in the buffer for sure.*/ chSysUnlockFromIsr(); n = (n / maxsize) * maxsize; - usbPrepareQueuedReceive(sdup->config->usbp, + usbPrepareQueuedReceive(usbp, USB_CDC_DATA_AVAILABLE_EP, &sdup->iqueue, n); chSysLockFromIsr(); - usbStartReceiveI(sdup->config->usbp, USB_CDC_DATA_AVAILABLE_EP); + usbStartReceiveI(usbp, USB_CDC_DATA_AVAILABLE_EP); } chSysUnlockFromIsr();