diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-07-02 18:47:09 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-07-02 18:47:09 +0000 |
commit | ec9736a27d1572f1a8357cae3dd56470f00af974 (patch) | |
tree | 51bba8898e93e8abaecd6d0c94ff668f3c610046 /os/hal/src/serial_usb.c | |
parent | d21d98e5bf9aceb0ca6cde4e3c20ff9dcdb695d8 (diff) | |
download | ChibiOS-ec9736a27d1572f1a8357cae3dd56470f00af974.tar.gz ChibiOS-ec9736a27d1572f1a8357cae3dd56470f00af974.tar.bz2 ChibiOS-ec9736a27d1572f1a8357cae3dd56470f00af974.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4388 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src/serial_usb.c')
-rw-r--r-- | os/hal/src/serial_usb.c | 10 |
1 files 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();
|