From c2582f6229dc15e19e08c8200773a1c496958f42 Mon Sep 17 00:00:00 2001 From: zolkko Date: Fri, 29 Apr 2016 01:29:54 +0300 Subject: [PATCH] clear epComplete flag if a packet has been handled in the callback --- libraries/USBDevice/USBDevice/USBHAL_STM32F4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/USBDevice/USBDevice/USBHAL_STM32F4.cpp b/libraries/USBDevice/USBDevice/USBHAL_STM32F4.cpp index 11905ab681..cc29a02707 100644 --- a/libraries/USBDevice/USBDevice/USBHAL_STM32F4.cpp +++ b/libraries/USBDevice/USBDevice/USBHAL_STM32F4.cpp @@ -367,7 +367,7 @@ void USBHAL::usbisr(void) { else { epComplete |= (1 << endpoint); if ((instance->*(epCallback[endpoint - 2]))()) { - epComplete &= (1 << endpoint); + epComplete &= ~(1 << endpoint); } } }