mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 05:42:56 +00:00
Interrupt time improvements
This commit is contained in:
parent
3401e0f6ff
commit
28696de390
@ -708,14 +708,19 @@ void dcd_int_handler(uint8_t rhport) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Use while loop to handle more than one fifo data entry
|
// RxFIFO non-empty interrupt handling.
|
||||||
// within a single interrupt call
|
if(int_status & USB_OTG_GINTSTS_RXFLVL) {
|
||||||
while(USB_OTG_FS->GINTSTS & USB_OTG_GINTSTS_RXFLVL) {
|
|
||||||
// RXFLVL bit is read-only
|
// RXFLVL bit is read-only
|
||||||
|
|
||||||
// Mask out RXFLVL while reading data from FIFO
|
// Mask out RXFLVL while reading data from FIFO
|
||||||
USB_OTG_FS->GINTMSK &= ~USB_OTG_GINTMSK_RXFLVLM;
|
USB_OTG_FS->GINTMSK &= ~USB_OTG_GINTMSK_RXFLVLM;
|
||||||
handle_rxflvl_ints(out_ep);
|
|
||||||
|
// Loop until all available packets were handled
|
||||||
|
do {
|
||||||
|
handle_rxflvl_ints(out_ep);
|
||||||
|
int_status = USB_OTG_FS->GINTSTS;
|
||||||
|
} while(int_status & USB_OTG_GINTSTS_RXFLVL);
|
||||||
|
|
||||||
USB_OTG_FS->GINTMSK |= USB_OTG_GINTMSK_RXFLVLM;
|
USB_OTG_FS->GINTMSK |= USB_OTG_GINTMSK_RXFLVLM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user