Skip to content

Commit

Permalink
drivers/usbdev_synopsys_dwc2: add OTG interrupt handling
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Mar 15, 2023
1 parent 3c93167 commit 38620fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/usbdev_synopsys_dwc2/usbdev_synopsys_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,13 @@ static void _usbdev_esr(usbdev_t *dev)
usbdev->usbdev.cb(&usbdev->usbdev, USBDEV_EVENT_RESUME);
}
}
else if (int_status & USB_OTG_GINTMSK_OTGINT) {
/* not handled yet, just clear GOTGINT to clear the interrupt */
event = USB_OTG_GINTMSK_OTGINT;
int_status = _global_regs(conf)->GOTGINT;
_global_regs(conf)->GOTGINT |= int_status;
DEBUG("usbdev: OTG interrupt reg %08"PRIx32"\n", int_status);
}

_global_regs(conf)->GINTSTS |= event;
_global_regs(conf)->GAHBCFG |= USB_OTG_GAHBCFG_GINT;
Expand Down

0 comments on commit 38620fd

Please sign in to comment.