aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-10-26 13:01:33 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-10-26 13:01:33 +0000
commit82e9c928eb0adc2508bbd70b458362efa512049b (patch)
tree5cc6c4dee2eea9ba26678e0ada91ea6344106880
parent6eab72aacff3780ece128b9eaad977f910c07873 (diff)
downloadChibiOS-82e9c928eb0adc2508bbd70b458362efa512049b.tar.gz
ChibiOS-82e9c928eb0adc2508bbd70b458362efa512049b.tar.bz2
ChibiOS-82e9c928eb0adc2508bbd70b458362efa512049b.zip
Fixed bug #542.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7430 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/ports/STM32/LLD/OTGv1/usb_lld.c5
-rw-r--r--testhal/STM32/STM32F4xx/USB_CDC/main.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c
index 100539410..eb6af99ca 100644
--- a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c
+++ b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c
@@ -624,7 +624,8 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) {
stm32_otg_t *otgp = usbp->otg;
uint32_t sts, src;
- sts = otgp->GINTSTS & otgp->GINTMSK;
+ sts = otgp->GINTSTS;
+ sts &= otgp->GINTMSK;
otgp->GINTSTS = sts;
/* Reset interrupt handling.*/
@@ -1346,8 +1347,6 @@ msg_t usb_lld_pump(void *p) {
}
osalSysLock();
}
- osalSysUnlock();
- return 0;
}
#endif /* HAL_USE_USB */
diff --git a/testhal/STM32/STM32F4xx/USB_CDC/main.c b/testhal/STM32/STM32F4xx/USB_CDC/main.c
index 054c4e23c..a8b57cd25 100644
--- a/testhal/STM32/STM32F4xx/USB_CDC/main.c
+++ b/testhal/STM32/STM32F4xx/USB_CDC/main.c
@@ -442,7 +442,7 @@ static msg_t Thread1(void *arg) {
(void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
systime_t time;
time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 500;