update(port/musb): add mode check

Signed-off-by: sakumisu <1203593632@qq.com>
This commit is contained in:
sakumisu
2025-08-05 21:27:45 +08:00
parent c0f544dafe
commit 8cf12c1958
2 changed files with 9 additions and 1 deletions

View File

@@ -977,6 +977,10 @@ void USBH_IRQHandler(uint8_t busid)
bus = &g_usbhost_bus[busid];
if (!(HWREGB(USB_BASE + MUSB_DEVCTL_OFFSET) & USB_DEVCTL_HOST)) {
return;
}
is = HWREGB(USB_BASE + MUSB_IS_OFFSET);
txis = HWREGH(USB_BASE + MUSB_TXIS_OFFSET);
rxis = HWREGH(USB_BASE + MUSB_RXIS_OFFSET);