git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4569 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2012-08-14 15:13:41 +00:00
parent 0bae886788
commit f0323b067c
1 changed files with 3 additions and 5 deletions

View File

@ -542,7 +542,7 @@ static void otg_epout_handler(USBDriver *usbp, usbep_t ep) {
}
/*===========================================================================*/
/* Driver interrupt handlers. */
/* Driver interrupt handlers and threads. */
/*===========================================================================*/
#if STM32_USB_USE_OTG1 || defined(__DOXYGEN__)
@ -561,28 +561,26 @@ CH_IRQ_HANDLER(STM32_OTG1_HANDLER) {
CH_IRQ_PROLOGUE();
sts = OTG->GINTSTS & OTG->GINTMSK;
OTG->GINTSTS = sts;
/* Reset interrupt handling.*/
if (sts & GINTSTS_USBRST) {
_usb_reset(usbp);
_usb_isr_invoke_event_cb(usbp, USB_EVENT_RESET);
OTG->GINTSTS = GINTSTS_USBRST;
}
/* Enumeration done.*/
if (sts & GINTSTS_ENUMDNE) {
(void)OTG->DSTS;
OTG->GINTSTS = GINTSTS_ENUMDNE;
}
/* SOF interrupt handling.*/
if (sts & GINTSTS_SOF) {
_usb_isr_invoke_sof_cb(usbp);
OTG->GINTSTS = GINTSTS_SOF;
}
/* RX FIFO not empty handling.*/
if (sts & GINTMSK_RXFLVLM) {
if (sts & GINTSTS_RXFLVL) {
otg_rxfifo_handler(usbp);
}