diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-04-16 08:20:31 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-04-16 08:20:31 +0000 |
commit | 6894388135c4efd41cb4a96b6dac396b94c64eb9 (patch) | |
tree | e30b710b3e558a2d49092d5dc24bd1485c6a89cb /os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c | |
parent | 556ed569c87f5ac1da899a40482206409c984f37 (diff) | |
download | ChibiOS-6894388135c4efd41cb4a96b6dac396b94c64eb9.tar.gz ChibiOS-6894388135c4efd41cb4a96b6dac396b94c64eb9.tar.bz2 ChibiOS-6894388135c4efd41cb4a96b6dac396b94c64eb9.zip |
Tentative fix for missing RX events.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10157 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c')
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c index 5069a915a..04425412e 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c +++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c @@ -419,7 +419,7 @@ static void otg_epout_handler(USBDriver *usbp, usbep_t ep) { USBOutEndpointState *osp;
/* Receive transfer complete, checking if it is a SETUP transfer on EP0,
- that it must be ignored, the STUPM handler will take care of it.*/
+ than it must be ignored, the STUPM handler will take care of it.*/
if ((ep == 0) && (usbp->ep0state == USB_EP0_WAITING_SETUP))
return;
@@ -427,7 +427,9 @@ static void otg_epout_handler(USBDriver *usbp, usbep_t ep) { osp = usbp->epc[ep]->out_state;
/* A short packet always terminates a transaction.*/
- if (((osp->rxcnt % usbp->epc[ep]->out_maxsize) == 0) &&
+/* if (((osp->rxcnt % usbp->epc[ep]->out_maxsize) == 0) &&
+ (osp->rxsize < osp->totsize)) {*/
+ if (((otgp->oe[ep].DOEPTSIZ & DOEPTSIZ_PKTCNT_MASK) == 0) &&
(osp->rxsize < osp->totsize)) {
/* In case the transaction covered only part of the total transfer
then another transaction is immediately started in order to
|