From f0323b067c40d2a7eec4f67942606a371044654f Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 14 Aug 2012 15:13:41 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4569 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/OTGv1/usb_lld.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c index 34034d7ca..43bc9d17c 100644 --- a/os/hal/platforms/STM32/OTGv1/usb_lld.c +++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c @@ -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); } -- cgit v1.2.3