From a5083011f9f371e11900bd0da51806e3f8d87b77 Mon Sep 17 00:00:00 2001 From: Cristian Maglie <c.maglie@arduino.cc> Date: Mon, 18 Aug 2014 15:33:39 +0200 Subject: [PATCH] Fixed USB-PID for zero --- boards.txt | 4 ++-- cores/arduino/USB/USBCore.cpp | 17 +++-------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/boards.txt b/boards.txt index 70eaa9ae..a2477190 100644 --- a/boards.txt +++ b/boards.txt @@ -17,8 +17,8 @@ arduino_zero_edbg.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld arduino_zero_edbg.build.openocdscript=openocd_scripts/arduino_zero.cfg arduino_zero_edbg.build.variant=arduino_zero arduino_zero_edbg.build.variant_system_lib= -arduino_zero_edbg.build.vid=0x03eb -arduino_zero_edbg.build.pid=0x2111 +arduino_zero_edbg.build.vid=0x2341 +arduino_zero_edbg.build.pid=0x004d arduino_zero_edbg.bootloader.tool=openocd arduino_zero_edbg.bootloader.file=zero/Release/Exe/samd21_sam_ba.bin diff --git a/cores/arduino/USB/USBCore.cpp b/cores/arduino/USB/USBCore.cpp index abd40bbd..7fc5a0fe 100644 --- a/cores/arduino/USB/USBCore.cpp +++ b/cores/arduino/USB/USBCore.cpp @@ -32,21 +32,8 @@ //================================================================== -#define USB_PID_LEONARDO 0x0034 -#define USB_PID_MICRO 0x0035 #define USB_PID_DUE 0x003E - -#if (defined CDC_ENABLED) && defined(HID_ENABLED) -//#define USB_PID_ZERO 0x004B // CDC and HID -#define USB_PID_ZERO 0x003B // CDC only -#else -#if (defined CDC_ENABLED) -#define USB_PID_ZERO 0x003B // CDC only usbserial.name -#else -#define USB_PID_ZERO 0x0045 // HID only -#endif -#endif - +#define USB_PID_ZERO 0x004D // USB Device #define USB_VID 0x2341 // arduino LLC vid @@ -68,6 +55,8 @@ const uint16_t STRING_LANGUAGE[2] = { // Use a hardcoded product name if none is provided #if USB_PID == USB_PID_DUE #define USB_PRODUCT "Arduino Due" +#elif USB_PID == USB_PID_ZERO + #define USB_PRODUCT "Arduino Zero" #else #define USB_PRODUCT "USB IO Board" #endif -- GitLab