diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-01-30 11:11:19 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-01-30 11:11:19 +0000 |
commit | 87aec1f48cd79adb924d3cfb855e300a76a64559 (patch) | |
tree | 81f13eb611e9cc4d74f63532e63dc50b6d6857e5 | |
parent | 41bdde6a69b549f18787a59c0dc4538a936d8ff7 (diff) | |
download | ChibiOS-87aec1f48cd79adb924d3cfb855e300a76a64559.tar.gz ChibiOS-87aec1f48cd79adb924d3cfb855e300a76a64559.tar.bz2 ChibiOS-87aec1f48cd79adb924d3cfb855e300a76a64559.zip |
Fixed bug #816.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10071 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c | 32 | ||||
-rw-r--r-- | readme.txt | 2 |
2 files changed, 32 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 52e44f011..73f585f21 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c +++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c @@ -609,12 +609,26 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) { otg_epin_handler(usbp, 2);
if (src & (1 << 3))
otg_epin_handler(usbp, 3);
-#if STM32_USB_USE_OTG2
+#if USB_MAX_ENDPOINTS >= 4
if (src & (1 << 4))
otg_epin_handler(usbp, 4);
+#endif
+#if USB_MAX_ENDPOINTS >= 5
if (src & (1 << 5))
otg_epin_handler(usbp, 5);
#endif
+#if USB_MAX_ENDPOINTS >= 6
+ if (src & (1 << 6))
+ otg_epin_handler(usbp, 6);
+#endif
+#if USB_MAX_ENDPOINTS >= 7
+ if (src & (1 << 7))
+ otg_epin_handler(usbp, 7);
+#endif
+#if USB_MAX_ENDPOINTS >= 8
+ if (src & (1 << 8))
+ otg_epin_handler(usbp, 8);
+#endif
}
if (sts & GINTSTS_OEPINT) {
if (src & (1 << 16))
@@ -625,12 +639,26 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) { otg_epout_handler(usbp, 2);
if (src & (1 << 19))
otg_epout_handler(usbp, 3);
-#if STM32_USB_USE_OTG2
+#if USB_MAX_ENDPOINTS >= 4
if (src & (1 << 20))
otg_epout_handler(usbp, 4);
+#endif
+#if USB_MAX_ENDPOINTS >= 5
if (src & (1 << 21))
otg_epout_handler(usbp, 5);
#endif
+#if USB_MAX_ENDPOINTS >= 6
+ if (src & (1 << 22))
+ otg_epout_handler(usbp, 6);
+#endif
+#if USB_MAX_ENDPOINTS >= 7
+ if (src & (1 << 23))
+ otg_epout_handler(usbp, 7);
+#endif
+#if USB_MAX_ENDPOINTS >= 8
+ if (src & (1 << 24))
+ otg_epout_handler(usbp, 8);
+#endif
}
}
diff --git a/readme.txt b/readme.txt index dca319543..f6eaffd28 100644 --- a/readme.txt +++ b/readme.txt @@ -157,6 +157,8 @@ - RT: Merged RT4.
- NIL: Merged NIL2.
- NIL: Added STM32F7 demo.
+- HAL: Fixed STM32 OTGv1 driver not serving interrupts for endpoints > 5
+ (bug #816)(backported to 16.1.8).
- VAR: Fixed BYTE_ORDER redefined in lwip_bindings/arch/cc.h (bug #814)
(backported to 16.1.7).
- HAL: Fixed setting alternate mode in STM32 GPIOv3 and GPIOv3 drivers can fail
|