Skip to content

Commit

Permalink
Fix usb_dwc_common.c late IN usb interrupt flag clearing, libopencm3#…
Browse files Browse the repository at this point in the history
…1241

This commit fixes issue libopencm3#1241
  • Loading branch information
shopov-stoyan authored and dragonmux committed Aug 11, 2024
1 parent 705c6ec commit 5e581f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/usb/usb_dwc_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,13 @@ void dwc_poll(usbd_device *usbd_dev)
for (i = 0; i < 4; i++) { /* Iterate over endpoints. */
if (REBASE(OTG_DIEPINT(i)) & OTG_DIEPINTX_XFRC) {
/* Transfer complete. */
REBASE(OTG_DIEPINT(i)) = OTG_DIEPINTX_XFRC;

if (usbd_dev->user_callback_ctr[i]
[USB_TRANSACTION_IN]) {
usbd_dev->user_callback_ctr[i]
[USB_TRANSACTION_IN](usbd_dev, i);
}

REBASE(OTG_DIEPINT(i)) = OTG_DIEPINTX_XFRC;
}
}

Expand Down

0 comments on commit 5e581f2

Please sign in to comment.