From c295917fad68d07de7dd6fd000a795e4edc5baaf Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Thu, 8 Sep 2011 15:39:17 -0400 Subject: [PATCH] Revert "support compile-time passing of PID to Leonardo/Micro sketches. PID comes from boards.txt - different for Micro and Leonardo" This reverts commit 3e0d195492247a7e7c2ec72476bf2a0991ea6d48. --- app/src/processing/app/debug/Compiler.java | 14 +------------- hardware/arduino/cores/arduino/USBDesc.h | 12 +++++++++++- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index 2731710ed..559df3a61 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -192,7 +192,7 @@ public class Compiler implements MessageConsumer { "-mmcu=" + boardPreferences.get("build.mcu"), "-o", buildPath + File.separator + primaryClassName + ".elf" - })); + })); for (File file : objectFiles) { baseCommandLinker.add(file.getAbsolutePath()); @@ -424,10 +424,6 @@ public class Compiler implements MessageConsumer { "-DF_CPU=" + boardPreferences.get("build.f_cpu"), "-DARDUINO=" + Base.REVISION, })); - - if (boardPreferences.get("usb.pid") != null) { - baseCommandCompiler.add("-DARDUINO_MODEL_PID=" + boardPreferences.get("usb.pid")); - } for (int i = 0; i < includePaths.size(); i++) { baseCommandCompiler.add("-I" + (String) includePaths.get(i)); @@ -455,10 +451,6 @@ public class Compiler implements MessageConsumer { "-DF_CPU=" + boardPreferences.get("build.f_cpu"), "-DARDUINO=" + Base.REVISION, })); - - if (boardPreferences.get("usb.pid") != null) { - baseCommandCompiler.add("-DARDUINO_MODEL_PID=" + boardPreferences.get("usb.pid")); - } for (int i = 0; i < includePaths.size(); i++) { baseCommandCompiler.add("-I" + (String) includePaths.get(i)); @@ -488,10 +480,6 @@ public class Compiler implements MessageConsumer { "-DF_CPU=" + boardPreferences.get("build.f_cpu"), "-DARDUINO=" + Base.REVISION, })); - - if (boardPreferences.get("usb.pid") != null) { - baseCommandCompilerCPP.add("-DARDUINO_MODEL_PID=" + boardPreferences.get("usb.pid")); - } for (int i = 0; i < includePaths.size(); i++) { baseCommandCompilerCPP.add("-I" + (String) includePaths.get(i)); diff --git a/hardware/arduino/cores/arduino/USBDesc.h b/hardware/arduino/cores/arduino/USBDesc.h index 49ecf1a01..2ad77251b 100644 --- a/hardware/arduino/cores/arduino/USBDesc.h +++ b/hardware/arduino/cores/arduino/USBDesc.h @@ -89,9 +89,19 @@ #define FAT_FILE_NAME 'F','I','R','M','W','A','R','E','B','I','N' // 11 chars #define MSC_DISK_SERIAL '0','0','0','0','0','0','0','0','1','7','0','1' // 12 chars +#ifdef MICROTOUCH + +#define USB_VID 0x239A // Adafruit vid +#define USB_PID 0x2001 // sorry dave sprach zarathustra +#define FAT_OEM_NAME 'r','o','s','s','u','m','u','r' // 8 chars +#define PRODUCT_NAME 'M','i','c','r','o','t','o','u','c','h' + +#else + #define USB_VID 0x2341 // arduino LLC vid -#define USB_PID ARDUINO_MODEL_PID // passed in at compile time - 0x0034 for Leonardo, 0x0035 for MIcro +#define USB_PID 0x0020 // educated guess #define FAT_OEM_NAME 'l','e','o','n','a','r','d','o' // 8 chars #define PRODUCT_NAME 'A','r','d','u','i','n','o','l','l','c' // 10 +#endif \ No newline at end of file