Skip to content

Commit ffd6d4e

Browse files
ccli8adbridge
authored andcommitted
Support USB device/host for chip series
With this fix, USB support is not limited to one target.
1 parent 69d6edc commit ffd6d4e

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

features/unsupported/USBDevice/USBDevice/USBEndpoints.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ typedef enum {
5353
#include "USBEndpoints_Maxim.h"
5454
#elif defined(TARGET_EFM32GG_STK3700) || defined(TARGET_EFM32LG_STK3600) || defined(TARGET_EFM32WG_STK3800) || defined(TARGET_EFM32HG_STK3400)
5555
#include "USBEndpoints_EFM32.h"
56-
#elif defined(TARGET_NUMAKER_PFM_NUC472)
56+
#elif defined(TARGET_NUC472)
5757
#include "USBEndpoints_NUC472.h"
58-
#elif defined(TARGET_NUMAKER_PFM_M453)
58+
#elif defined(TARGET_M451)
5959
#include "USBEndpoints_M453.h"
6060
#elif defined(TARGET_M480)
6161
#include "USBEndpoints_M480.h"

features/unsupported/USBDevice/USBDevice/USBHAL.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ class USBHAL {
6868
virtual void suspendStateChanged(unsigned int suspended){};
6969
virtual void SOF(int frameNumber){};
7070

71-
#if defined(TARGET_NUMAKER_PFM_NUC472) || defined(TARGET_NUMAKER_PFM_M453)
72-
// NUC472/M453 USB doesn't support configuration of the same EP number for IN/OUT simultaneously.
71+
#if defined(TARGET_NUC472) || defined(TARGET_M451)
72+
// NUC472/M451 USB doesn't support configuration of the same EP number for IN/OUT simultaneously.
7373
virtual bool EP1_OUT_callback(){return false;};
7474
virtual bool EP2_IN_callback(){return false;};
7575
virtual bool EP3_OUT_callback(){return false;};
7676
virtual bool EP4_IN_callback(){return false;};
7777
virtual bool EP5_OUT_callback(){return false;};
7878
virtual bool EP6_IN_callback(){return false;};
79-
#if ! (defined(TARGET_NUMAKER_PFM_M453))
79+
#if ! (defined(TARGET_M451))
8080
virtual bool EP7_OUT_callback(){return false;};
8181
virtual bool EP8_IN_callback(){return false;};
8282
virtual bool EP9_OUT_callback(){return false;};
@@ -128,11 +128,11 @@ class USBHAL {
128128

129129
#if defined(TARGET_LPC11UXX) || defined(TARGET_LPC11U6X) || defined(TARGET_LPC1347) || defined(TARGET_LPC1549)
130130
bool (USBHAL::*epCallback[10 - 2])(void);
131-
#elif (defined(TARGET_STM32F4) && !defined(USB_STM_HAL)) || defined(TARGET_NUMAKER_PFM_M453)
131+
#elif (defined(TARGET_STM32F4) && !defined(USB_STM_HAL)) || defined(TARGET_M451)
132132
bool (USBHAL::*epCallback[8 - 2])(void);
133133
#elif defined(TARGET_STM)
134134
PCD_HandleTypeDef hpcd;
135-
#elif defined(TARGET_NUMAKER_PFM_NUC472) || defined(TARGET_M480)
135+
#elif defined(TARGET_NUC472) || defined(TARGET_M480)
136136
bool (USBHAL::*epCallback[14 - 2])(void);
137137
#else
138138
bool (USBHAL::*epCallback[32 - 2])(void);

features/unsupported/USBDevice/USBDevice/USBHAL_M453.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
#if defined(TARGET_NUMAKER_PFM_M453)
17+
#if defined(TARGET_M451)
1818

1919
#include "USBHAL.h"
2020
#include "M451Series.h"

features/unsupported/USBDevice/USBDevice/USBHAL_NUC472.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
#if defined(TARGET_NUMAKER_PFM_NUC472)
17+
#if defined(TARGET_NUC472)
1818

1919
#include "USBHAL.h"
2020
#include "NUC472_442.h"

0 commit comments

Comments
 (0)