diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-09-16 12:09:51 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-09-16 12:09:51 -0400 |
commit | 24cb818be877f352e244c155533839c10d3acdf3 (patch) | |
tree | 1d6af2f88ee137d6de1f22244c8baa0c692e118c /bootloaders/diskloader/src | |
parent | 81bfed93e5ce246050d7e4b4744b0561b847061d (diff) |
bootloader iProduct definition changed to "Arduino Leonardo Bootloader" or "Arduino Micro Bootloader". selection depends on PID passed in at compile time
Diffstat (limited to 'bootloaders/diskloader/src')
-rw-r--r-- | bootloaders/diskloader/src/Platform.h | 2 | ||||
-rw-r--r-- | bootloaders/diskloader/src/USBDesc.cpp | 11 | ||||
-rw-r--r-- | bootloaders/diskloader/src/USBDesc.h | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/bootloaders/diskloader/src/Platform.h b/bootloaders/diskloader/src/Platform.h index 2b00b71..471bc90 100644 --- a/bootloaders/diskloader/src/Platform.h +++ b/bootloaders/diskloader/src/Platform.h @@ -19,6 +19,8 @@ typedef unsigned long u32; #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) #define DISABLE_JTAG() MCUCR = (1 << JTD) | (1 << IVCE) | (0 << PUD); MCUCR = (1 << JTD) | (0 << IVSEL) | (0 << IVCE) | (0 << PUD); +#define USB_PID_LEONARDO 0x0034 +#define USB_PID_MICRO 0x0035 #define USB_VID 0x2341 // arduino LLC vid #define USB_PID ARDUINO_MODEL_PID // passed in by Makefile - 0x0034 for Leonardo, 0x0035 for MIcro diff --git a/bootloaders/diskloader/src/USBDesc.cpp b/bootloaders/diskloader/src/USBDesc.cpp index be322a0..c8ea9c6 100644 --- a/bootloaders/diskloader/src/USBDesc.cpp +++ b/bootloaders/diskloader/src/USBDesc.cpp @@ -27,9 +27,14 @@ const u16 STRING_LANGUAGE[2] = { 0x0409 // English }; -const u16 STRING_IPRODUCT[17] = { - (3<<8) | (2+2*16), - 'A','r','d','u','i','n','o',' ','L','e','o','n','a','r','d','o' + +const u16 STRING_IPRODUCT[28] = { + (3<<8) | (2+2*27), +#if USB_PID == USB_PID_LEONARDO + 'A','r','d','u','i','n','o',' ','L','e','o','n','a','r','d','o',' ','b','o','o','t','l','o','a','d','e','r' +#elif USB_PID == USB_PID_MICRO + 'A','r','d','u','i','n','o',' ','M','i','c','r','o',' ','b','o','o','t','l','o','a','d','e','r',' ',' ',' ' +#endif }; const u16 STRING_IMANUFACTURER[12] = { diff --git a/bootloaders/diskloader/src/USBDesc.h b/bootloaders/diskloader/src/USBDesc.h index a40bae1..094dba5 100644 --- a/bootloaders/diskloader/src/USBDesc.h +++ b/bootloaders/diskloader/src/USBDesc.h @@ -53,7 +53,7 @@ extern DeviceDescriptor USB_DeviceDescriptor PROGMEM; extern DeviceDescriptor USB_DeviceDescriptorA PROGMEM; extern const u16 STRING_LANGUAGE[2] PROGMEM; -extern const u16 STRING_IPRODUCT[17] PROGMEM; +extern const u16 STRING_IPRODUCT[28] PROGMEM; extern const u16 STRING_IMANUFACTURER[12] PROGMEM; #define IMANUFACTURER 1 |