summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-07-16 20:44:06 +0700
committerhathach <[email protected]>2020-07-16 20:44:06 +0700
commitdc00f0cae10ec43c9f035938276b7000c3120ec2 (patch)
tree4403bcc174e11568db3d53616315de6b57029ba4 /src
parent0517f4a2f1d7e115cabab7c850463f1836a35a05 (diff)
update link speed detection for nuc505
Diffstat (limited to 'src')
-rw-r--r--src/portable/nuvoton/nuc505/dcd_nuc505.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/portable/nuvoton/nuc505/dcd_nuc505.c b/src/portable/nuvoton/nuc505/dcd_nuc505.c
index e67b69ab2..a7961a687 100644
--- a/src/portable/nuvoton/nuc505/dcd_nuc505.c
+++ b/src/portable/nuvoton/nuc505/dcd_nuc505.c
@@ -452,7 +452,9 @@ void dcd_int_handler(uint8_t rhport)
USBD->CEPINTEN = USBD_CEPINTEN_SETUPPKIEN_Msk;
USBD->BUSINTEN = USBD_BUSINTEN_RSTIEN_Msk | USBD_BUSINTEN_RESUMEIEN_Msk | USBD_BUSINTEN_SUSPENDIEN_Msk | USBD_BUSINTEN_DMADONEIEN_Msk;
USBD->CEPINTSTS = 0x1ffc;
- dcd_event_bus_signal(0, DCD_EVENT_BUS_RESET, true);
+
+ tusb_speed_t speed = (USBD->OPER & USBD_OPER_CURSPD_Msk) ? TUSB_SPEED_HIGH : TUSB_SPEED_FULL;
+ dcd_event_bus_reset(0, speed, true);
}
if (bus_state & USBD_BUSINTSTS_RESUMEIF_Msk)