diff options
| -rw-r--r-- | port/chipidea/usb_dc_chipidea.c | 2 | ||||
| -rw-r--r-- | port/hpmicro/usb_dc_hpm.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/port/chipidea/usb_dc_chipidea.c b/port/chipidea/usb_dc_chipidea.c index ddead2b9..d8122ece 100644 --- a/port/chipidea/usb_dc_chipidea.c +++ b/port/chipidea/usb_dc_chipidea.c @@ -722,7 +722,7 @@ void USBD_IRQHandler(uint8_t busid) if (ep_addr & 0x80) { usbd_event_ep_in_complete_handler(busid, ep_addr, transfer_len); } else { - usb_dcache_invalidate((uintptr_t)g_chipidea_udc[busid].out_ep[ep_idx].xfer_buf, USB_ALIGN_UP(transfer_len, CONFIG_USB_ALIGN_SIZE)); + usb_dcache_invalidate((uintptr_t)g_chipidea_udc[busid].out_ep[ep_idx / 2].xfer_buf, USB_ALIGN_UP(transfer_len, CONFIG_USB_ALIGN_SIZE)); usbd_event_ep_out_complete_handler(busid, ep_addr, transfer_len); } } diff --git a/port/hpmicro/usb_dc_hpm.c b/port/hpmicro/usb_dc_hpm.c index a3a9fdc1..551e90b8 100644 --- a/port/hpmicro/usb_dc_hpm.c +++ b/port/hpmicro/usb_dc_hpm.c @@ -374,7 +374,7 @@ void USBD_IRQHandler(uint8_t busid) if (ep_addr & 0x80) { usbd_event_ep_in_complete_handler(busid, ep_addr, transfer_len); } else { - usb_dcache_invalidate((uintptr_t)g_hpm_udc[busid].out_ep[ep_idx].xfer_buf, USB_ALIGN_UP(transfer_len, CONFIG_USB_ALIGN_SIZE)); + usb_dcache_invalidate((uintptr_t)g_hpm_udc[busid].out_ep[ep_idx / 2].xfer_buf, USB_ALIGN_UP(transfer_len, CONFIG_USB_ALIGN_SIZE)); usbd_event_ep_out_complete_handler(busid, ep_addr, transfer_len); } } |
