summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2026-02-28 21:54:38 +0800
committersakumisu <[email protected]>2026-02-28 21:54:38 +0800
commitb5c8565fc8abc791c39d125de95fe5540cc774ca (patch)
tree2bce0d7424131a4256ad07f3569e9c83cc457d32
parent3bd0925416d349847674c961f9cc220828a1ff3e (diff)
fix(port/hpmicro): fix out ep idx
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--port/chipidea/usb_dc_chipidea.c2
-rw-r--r--port/hpmicro/usb_dc_hpm.c2
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);
}
}