Skip to content

Commit 202ee59

Browse files
committed
move USB VID & PID to variant.h
1 parent 68c94e1 commit 202ee59

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

cores/nRF5/main.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818

1919
#include "usb.h"
2020

21-
/* USB VID/PID if not defined, tinyusb to use default value
22-
* Note: different class combination e.g CDC and (CDC + MSC) should have different
23-
* PID since Host OS will "remembered" device driver after the first plug */
24-
#define USB_VID 0x239A
25-
#define USB_PID 0x8029
26-
2721
// DEBUG Level 1
2822
#if CFG_DEBUG
2923
// weak function to avoid compilation error with

variants/feather_nrf52840_express/variant.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ static const uint8_t SCK = PIN_SPI_SCK ;
138138
#define USB_MSC_BLOCK_SIZE 512
139139
#define USB_MSC_BLOCK_COUNT ((2*1024*1024) / USB_MSC_BLOCK_SIZE)
140140

141+
/* Note: different class combination e.g CDC and (CDC + MSC) should have different
142+
* PID since Host OS will "remembered" device driver after the first plug */
143+
#define USB_VID 0x239A
144+
#define USB_PID 0x8029
145+
141146
#ifdef __cplusplus
142147
}
143148
#endif

variants/metro_nrf52840_express/variant.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,11 @@ static const uint8_t SCK = PIN_SPI_SCK ;
136136
// If EXTERNAL_FLASH_DEVICES is not defined, all supported devices will be used
137137
#define EXTERNAL_FLASH_DEVICES GD25Q16C
138138

139+
/* Note: different class combination e.g CDC and (CDC + MSC) should have different
140+
* PID since Host OS will "remembered" device driver after the first plug */
141+
#define USB_VID 0x239A
142+
#define USB_PID 0x8029
143+
139144
#ifdef __cplusplus
140145
}
141146
#endif

variants/pca10056/variant.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ static const uint8_t SCK = PIN_SPI_SCK ;
131131
#define USB_MSC_BLOCK_SIZE 512
132132
#define USB_MSC_BLOCK_COUNT ((8*1024*1024) / USB_MSC_BLOCK_SIZE)
133133

134+
/* Note: different class combination e.g CDC and (CDC + MSC) should have different
135+
* PID since Host OS will "remembered" device driver after the first plug */
136+
#define USB_VID 0x239A
137+
#define USB_PID 0x8029
138+
134139
#ifdef __cplusplus
135140
}
136141
#endif

0 commit comments

Comments
 (0)