File tree 3 files changed +13
-18
lines changed
3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ arduino_due_x_dbg.upload.wait_for_upload_port=false
12
12
arduino_due_x_dbg.upload.native_usb=false
13
13
arduino_due_x_dbg.build.mcu=cortex-m3
14
14
arduino_due_x_dbg.build.f_cpu=84000000L
15
+ arduino_due_x_dbg.build.usb_manufacturer="Arduino LLC"
15
16
arduino_due_x_dbg.build.usb_product="Arduino Due"
16
17
arduino_due_x_dbg.build.board=SAM_DUE
17
18
arduino_due_x_dbg.build.core=arduino
@@ -35,6 +36,7 @@ arduino_due_x.upload.wait_for_upload_port=true
35
36
arduino_due_x.upload.native_usb=true
36
37
arduino_due_x.build.mcu=cortex-m3
37
38
arduino_due_x.build.f_cpu=84000000L
39
+ arduino_due_x.build.usb_manufacturer="Arduino LLC"
38
40
arduino_due_x.build.usb_product="Arduino Due"
39
41
arduino_due_x.build.board=SAM_DUE
40
42
arduino_due_x.build.core=arduino
Original file line number Diff line number Diff line change @@ -209,10 +209,14 @@ extern const PinDescription g_APinDescription[] ;
209
209
#include "watchdog.h"
210
210
211
211
// USB Device
212
- #define USB_VID 0x2341 // arduino LLC vid
213
- #define USB_PID_LEONARDO 0x0034
214
- #define USB_PID_MICRO 0x0035
215
- #define USB_PID_DUE 0x003E
212
+ #ifndef USB_VID
213
+ #define USB_VID 0x2341 // arduino LLC vid
214
+ #endif
215
+
216
+ #ifndef USB_PID
217
+ #define USB_PID 0x003E // arduino Due pid
218
+ #endif
219
+
216
220
#include "USB/USBDesc.h"
217
221
#include "USB/USBCore.h"
218
222
#include "USB/USBAPI.h"
Original file line number Diff line number Diff line change @@ -66,27 +66,16 @@ const uint16_t STRING_LANGUAGE[2] = {
66
66
};
67
67
68
68
#ifndef USB_PRODUCT
69
- // Use a hardcoded product name if none is provided
70
- #if USB_PID == USB_PID_DUE
71
69
#define USB_PRODUCT " Arduino Due"
72
- #else
73
- #define USB_PRODUCT " USB IO Board"
74
- #endif
75
70
#endif
76
71
77
72
const uint8_t STRING_PRODUCT[] = USB_PRODUCT;
78
73
79
- #if USB_VID == 0x2341
80
- # if defined(USB_MANUFACTURER)
81
- # undef USB_MANUFACTURER
82
- # endif
83
- # define USB_MANUFACTURER " Arduino LLC"
84
- #elif !defined(USB_MANUFACTURER)
85
- // Fall through to unknown if no manufacturer name was provided in a macro
86
- # define USB_MANUFACTURER " Unknown"
74
+ #ifndef USB_MANUFACTURER
75
+ #define USB_MANUFACTURER " Arduino LLC"
87
76
#endif
88
77
89
- const uint8_t STRING_MANUFACTURER[12 ] = USB_MANUFACTURER;
78
+ const uint8_t STRING_MANUFACTURER[] = USB_MANUFACTURER;
90
79
91
80
#ifdef CDC_ENABLED
92
81
#define DEVICE_CLASS 0x02
You can’t perform that action at this time.
0 commit comments