Skip to content

Commit

Permalink
Fixed possible race condition (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbederks authored Apr 7, 2020
1 parent a05361e commit 74d10cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions board/drivers/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -941,10 +941,12 @@ void usb_irqhandler(void) {
}

void usb_outep3_resume_if_paused() {
ENTER_CRITICAL();
if (!outep3_processing && (USBx_OUTEP(3)->DOEPCTL & USB_OTG_DOEPCTL_NAKSTS) != 0) {
USBx_OUTEP(3)->DOEPTSIZ = (1U << 19) | 0x40U;
USBx_OUTEP(3)->DOEPCTL |= USB_OTG_DOEPCTL_EPENA | USB_OTG_DOEPCTL_CNAK;
}
EXIT_CRITICAL();
}

void OTG_FS_IRQ_Handler(void) {
Expand Down

0 comments on commit 74d10cc

Please sign in to comment.