STM32 OTGv1 tentative fix.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10117 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
8e47415958
commit
4acb7db6d4
|
@ -600,36 +600,6 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) {
|
||||||
|
|
||||||
/* IN/OUT endpoints event handling.*/
|
/* IN/OUT endpoints event handling.*/
|
||||||
src = otgp->DAINT;
|
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 (sts & GINTSTS_OEPINT) {
|
||||||
if (src & (1 << 16))
|
if (src & (1 << 16))
|
||||||
otg_epout_handler(usbp, 0);
|
otg_epout_handler(usbp, 0);
|
||||||
|
@ -658,6 +628,36 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) {
|
||||||
#if USB_MAX_ENDPOINTS >= 8
|
#if USB_MAX_ENDPOINTS >= 8
|
||||||
if (src & (1 << 24))
|
if (src & (1 << 24))
|
||||||
otg_epout_handler(usbp, 8);
|
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
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue