diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-04-15 08:57:50 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-04-15 08:57:50 +0000 |
commit | 8097785b8a1d668944747bc02431451664669986 (patch) | |
tree | 9000b03a076d82b8ad89a3ba7c481532fd3a368f /os/hal/ports/STM32/LLD/USBv1 | |
parent | 2cdfb90a17502fc70bb243da96e94c738ffe6fea (diff) | |
download | ChibiOS-8097785b8a1d668944747bc02431451664669986.tar.gz ChibiOS-8097785b8a1d668944747bc02431451664669986.tar.bz2 ChibiOS-8097785b8a1d668944747bc02431451664669986.zip |
Fixed bug #938 and #939.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11940 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/ports/STM32/LLD/USBv1')
-rw-r--r-- | os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c index 1abbbf747..e773bc143 100644 --- a/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c +++ b/os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.c @@ -647,6 +647,15 @@ void usb_lld_init_endpoint(USBDriver *usbp, usbep_t ep) { #endif
}
+ /* Resetting the data toggling bits for this endpoint.*/
+ if (STM32_USB->EPR[ep] & EPR_DTOG_RX) {
+ epr |= EPR_DTOG_RX;
+ }
+
+ if (STM32_USB->EPR[ep] & EPR_DTOG_TX) {
+ epr |= EPR_DTOG_TX;
+ }
+
/* EPxR register setup.*/
EPR_SET(ep, epr | ep);
EPR_TOGGLE(ep, epr);
|