mirror of https://github.com/ARMmbed/mbed-os.git
[NUC472/M453] Support USB device/host for chip series
With this fix, USB support is not limited to one target.pull/4950/head
parent
cacc444b73
commit
478a1b62ea
|
@ -53,9 +53,9 @@ typedef enum {
|
|||
#include "USBEndpoints_Maxim.h"
|
||||
#elif defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32HG_STK3400)
|
||||
#include "USBEndpoints_EFM32.h"
|
||||
#elif defined(TARGET_NUMAKER_PFM_NUC472)
|
||||
#elif defined(TARGET_NUC472)
|
||||
#include "USBEndpoints_NUC472.h"
|
||||
#elif defined(TARGET_NUMAKER_PFM_M453)
|
||||
#elif defined(TARGET_M451)
|
||||
#include "USBEndpoints_M453.h"
|
||||
#elif defined(TARGET_M480)
|
||||
#include "USBEndpoints_M480.h"
|
||||
|
|
|
@ -68,15 +68,15 @@ protected:
|
|||
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.
|
||||
#if defined(TARGET_NUC472) || defined(TARGET_M451)
|
||||
// NUC472/M451 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))
|
||||
#if ! (defined(TARGET_M451))
|
||||
virtual bool EP7_OUT_callback(){return false;};
|
||||
virtual bool EP8_IN_callback(){return false;};
|
||||
virtual bool EP9_OUT_callback(){return false;};
|
||||
|
@ -128,11 +128,11 @@ private:
|
|||
|
||||
#if defined(TARGET_LPC11UXX) || defined(TARGET_LPC11U6X) || defined(TARGET_LPC1347) || defined(TARGET_LPC1549)
|
||||
bool (USBHAL::*epCallback[10 - 2])(void);
|
||||
#elif (defined(TARGET_STM32F4) && !defined(USB_STM_HAL)) || defined(TARGET_NUMAKER_PFM_M453)
|
||||
#elif (defined(TARGET_STM32F4) && !defined(USB_STM_HAL)) || defined(TARGET_M451)
|
||||
bool (USBHAL::*epCallback[8 - 2])(void);
|
||||
#elif defined(TARGET_STM)
|
||||
PCD_HandleTypeDef hpcd;
|
||||
#elif defined(TARGET_NUMAKER_PFM_NUC472) || defined(TARGET_M480)
|
||||
#elif defined(TARGET_NUC472) || defined(TARGET_M480)
|
||||
bool (USBHAL::*epCallback[14 - 2])(void);
|
||||
#else
|
||||
bool (USBHAL::*epCallback[32 - 2])(void);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(TARGET_NUMAKER_PFM_M453)
|
||||
#if defined(TARGET_M451)
|
||||
|
||||
#include "USBHAL.h"
|
||||
#include "M451Series.h"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(TARGET_NUMAKER_PFM_NUC472)
|
||||
#if defined(TARGET_NUC472)
|
||||
|
||||
#include "USBHAL.h"
|
||||
#include "NUC472_442.h"
|
||||
|
|
Loading…
Reference in New Issue