From 6ab58fe93d47d822b351aa33b50a9b28a60ac67b Mon Sep 17 00:00:00 2001 From: Eric Price Date: Fri, 12 Oct 2018 15:54:58 +0200 Subject: [PATCH] LP-602 bugfix in STM32_USB_OTG_Driver to prevent IRQ hammering on USB replug --- .../stm32f4xx/libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/pios/stm32f4xx/libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c b/flight/pios/stm32f4xx/libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c index d6e52c604..1c5e33d4a 100644 --- a/flight/pios/stm32f4xx/libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c +++ b/flight/pios/stm32f4xx/libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c @@ -681,7 +681,7 @@ static uint32_t DCD_WriteEmptyTxFifo(USB_OTG_CORE_HANDLE *pdev, uint32_t epnum) } // --- start fix uint32_t fifoemptymsk; - if (len < ep->maxpacket) + if (len <= ep->maxpacket) { // FIFO empty fifoemptymsk = 0x1 << epnum;