Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of USBDevice by
Diff: USBDevice/USBHAL_STM32F4.cpp
- Revision:
- 70:2c525a50f1b6
- Parent:
- 53:5534733abe31
diff -r c5e178adb138 -r 2c525a50f1b6 USBDevice/USBHAL_STM32F4.cpp
--- a/USBDevice/USBHAL_STM32F4.cpp Fri Nov 11 17:59:00 2016 +0000
+++ b/USBDevice/USBHAL_STM32F4.cpp Thu Jul 20 10:14:36 2017 +0100
@@ -16,7 +16,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#if defined(TARGET_STM32F4)
+#if defined(TARGET_STM32F4) && !defined(USB_STM_HAL)
#include "USBHAL.h"
#include "USBRegs_STM32.h"
@@ -48,7 +48,7 @@
// Enable power and clocking
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
-#if defined(TARGET_STM32F407VG) || defined(TARGET_STM32F401RE) || defined(TARGET_STM32F411RE) || defined(TARGET_STM32F429ZI)
+#if defined(TARGET_STM32F407VG) || defined(TARGET_STM32F401RE) || defined(TARGET_STM32F411RE) || defined(TARGET_STM32F412ZG) || defined(TARGET_STM32F429ZI)
pin_function(PA_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF10_OTG_FS));
pin_function(PA_9, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLDOWN, GPIO_AF10_OTG_FS));
pin_function(PA_10, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS));
@@ -367,7 +367,7 @@
else {
epComplete |= (1 << endpoint);
if ((instance->*(epCallback[endpoint - 2]))()) {
- epComplete &= (1 << endpoint);
+ epComplete &= ~(1 << endpoint);
}
}
}
