summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/usb/arcotg_dcd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/firmware/drivers/usb/arcotg_dcd.c b/firmware/drivers/usb/arcotg_dcd.c
index 0674342eb9..fe8ae803c0 100644
--- a/firmware/drivers/usb/arcotg_dcd.c
+++ b/firmware/drivers/usb/arcotg_dcd.c
@@ -488,13 +488,15 @@ static void reset_int(void)
UDC_ENDPTFLUSH = ~0;
- if ((UDC_PORTSC1 & (1 << 8)) == 0) {
+ if ((UDC_PORTSC1 & PORTSCX_PORT_RESET) == 0) {
logf("TIMEOUT->port");
}
- UDC_USBSTS = (1 << 6);
+ /* clear USB Reset status bit */
+ UDC_USBSTS = USB_STS_RESET;
- while ((UDC_USBSTS & (1 << 2)) == 0) { /* wait for port change */
+ /* wait for port change */
+ while ((UDC_USBSTS & USB_STS_PORT_CHANGE) == 0) {
if (timer_expired(&t)) {
logf("TIMEOUT->portchange");
}