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.
Dependents: ObCP_ENSMM_V2020_Test_Accelero
Diff: USBDevice/USBHAL.h
- Revision:
- 70:2c525a50f1b6
- Parent:
- 31:5bf05f9b3c7b
diff -r c5e178adb138 -r 2c525a50f1b6 USBDevice/USBHAL.h
--- a/USBDevice/USBHAL.h Fri Nov 11 17:59:00 2016 +0000
+++ b/USBDevice/USBHAL.h Thu Jul 20 10:14:36 2017 +0100
@@ -21,7 +21,7 @@
#include "mbed.h"
#include "USBEndpoints.h"
-#include "toolchain.h"
+#include "mbed_toolchain.h"
//#ifdef __GNUC__
//#define __packed __attribute__ ((__packed__))
@@ -68,6 +68,23 @@
virtual void suspendStateChanged(unsigned int suspended){};
virtual void SOF(int frameNumber){};
+#if defined(TARGET_NUMAKER_PFM_NUC472) || defined(TARGET_NUMAKER_PFM_M453)
+ // NUC472/M453 USB doesn't support configuration of the same EP number for IN/OUT simultaneously.
+ virtual bool EP1_OUT_callback(){return false;};
+ virtual bool EP2_IN_callback(){return false;};
+ virtual bool EP3_OUT_callback(){return false;};
+ virtual bool EP4_IN_callback(){return false;};
+ virtual bool EP5_OUT_callback(){return false;};
+ virtual bool EP6_IN_callback(){return false;};
+#if ! (defined(TARGET_NUMAKER_PFM_M453))
+ virtual bool EP7_OUT_callback(){return false;};
+ virtual bool EP8_IN_callback(){return false;};
+ virtual bool EP9_OUT_callback(){return false;};
+ virtual bool EP10_IN_callback(){return false;};
+ virtual bool EP11_OUT_callback(){return false;};
+ virtual bool EP12_IN_callback(){return false;};
+#endif
+#else
virtual bool EP1_OUT_callback(){return false;};
virtual bool EP1_IN_callback(){return false;};
virtual bool EP2_OUT_callback(){return false;};
@@ -102,6 +119,7 @@
virtual bool EP15_IN_callback(){return false;};
#endif
#endif
+#endif
private:
void usbisr(void);
@@ -109,11 +127,15 @@
static USBHAL * instance;
#if defined(TARGET_LPC11UXX) || defined(TARGET_LPC11U6X) || defined(TARGET_LPC1347) || defined(TARGET_LPC1549)
- bool (USBHAL::*epCallback[10 - 2])(void);
-#elif defined(TARGET_STM32F4)
- bool (USBHAL::*epCallback[8 - 2])(void);
+ bool (USBHAL::*epCallback[10 - 2])(void);
+#elif (defined(TARGET_STM32F4) && !defined(USB_STM_HAL)) || defined(TARGET_NUMAKER_PFM_M453)
+ bool (USBHAL::*epCallback[8 - 2])(void);
+#elif defined(TARGET_STM)
+ PCD_HandleTypeDef hpcd;
+#elif defined(TARGET_NUMAKER_PFM_NUC472)
+ bool (USBHAL::*epCallback[14 - 2])(void);
#else
- bool (USBHAL::*epCallback[32 - 2])(void);
+ bool (USBHAL::*epCallback[32 - 2])(void);
#endif