diff options
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/usb_lld.c | 5 | ||||
-rw-r--r-- | testhal/STM32/STM32F4xx/USB_CDC/main.c | 2 |
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;
|