aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-03-06 13:43:57 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-03-06 13:43:57 +0000
commit4acb7db6d447c49af08712aacdabc86361da6bc5 (patch)
tree4920c0eecc6a5889569620973b26718a3df022ca /os/hal/ports/STM32/LLD
parent8e47415958cd7ca27a36e0ab926bc437950b975e (diff)
downloadChibiOS-4acb7db6d447c49af08712aacdabc86361da6bc5.tar.gz
ChibiOS-4acb7db6d447c49af08712aacdabc86361da6bc5.tar.bz2
ChibiOS-4acb7db6d447c49af08712aacdabc86361da6bc5.zip
STM32 OTGv1 tentative fix.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10117 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD')
-rw-r--r--os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c60
1 files changed, 30 insertions, 30 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 069de3753..5069a915a 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
+++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c
@@ -600,36 +600,6 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) {
/* IN/OUT endpoints event handling.*/
src = otgp->DAINT;
- if (sts & GINTSTS_IEPINT) {
- if (src & (1 << 0))
- otg_epin_handler(usbp, 0);
- if (src & (1 << 1))
- otg_epin_handler(usbp, 1);
- if (src & (1 << 2))
- otg_epin_handler(usbp, 2);
- if (src & (1 << 3))
- otg_epin_handler(usbp, 3);
-#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))
otg_epout_handler(usbp, 0);
@@ -660,6 +630,36 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) {
otg_epout_handler(usbp, 8);
#endif
}
+ if (sts & GINTSTS_IEPINT) {
+ if (src & (1 << 0))
+ otg_epin_handler(usbp, 0);
+ if (src & (1 << 1))
+ otg_epin_handler(usbp, 1);
+ if (src & (1 << 2))
+ otg_epin_handler(usbp, 2);
+ if (src & (1 << 3))
+ otg_epin_handler(usbp, 3);
+#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
+ }
}
/*===========================================================================*/