diff options
Diffstat (limited to 'bootloaders/diskloader/src')
-rw-r--r-- | bootloaders/diskloader/src/USBCore.cpp | 4 | ||||
-rw-r--r-- | bootloaders/diskloader/src/USBDesc.cpp | 14 | ||||
-rw-r--r-- | bootloaders/diskloader/src/USBDesc.h | 8 |
3 files changed, 20 insertions, 6 deletions
diff --git a/bootloaders/diskloader/src/USBCore.cpp b/bootloaders/diskloader/src/USBCore.cpp index 1a8f2d0..ca74721 100644 --- a/bootloaders/diskloader/src/USBCore.cpp +++ b/bootloaders/diskloader/src/USBCore.cpp @@ -374,6 +374,10 @@ bool SendDescriptor() { if (setup.wValueL == 0) desc_addr = (const u8*)&STRING_LANGUAGE; + else if (setup.wValueL == IPRODUCT) + desc_addr = (const u8*)&STRING_IPRODUCT; + else if (setup.wValueL == IMANUFACTURER) + desc_addr = (const u8*)&STRING_IMANUFACTURER; else return false; } else diff --git a/bootloaders/diskloader/src/USBDesc.cpp b/bootloaders/diskloader/src/USBDesc.cpp index ec7cf7d..be322a0 100644 --- a/bootloaders/diskloader/src/USBDesc.cpp +++ b/bootloaders/diskloader/src/USBDesc.cpp @@ -27,11 +27,21 @@ 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_IMANUFACTURER[12] = { + (3<<8) | (2+2*11), + 'A','r','d','u','i','n','o',' ','L','L','C' +}; + //#ifdef CDC_ENABLED -DeviceDescriptor USB_DeviceDescriptorA = D_DEVICE(0X02,0X00,0X00,64,USB_VID,USB_PID,0x100,0,IPRODUCT,ISERIAL,1); +DeviceDescriptor USB_DeviceDescriptorA = D_DEVICE(0X02,0X00,0X00,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,0,1); //#else -DeviceDescriptor USB_DeviceDescriptor = D_DEVICE(0x00,0x00,0x00,64,USB_VID,USB_PID,0x100,0,IPRODUCT,ISERIAL,1); +DeviceDescriptor USB_DeviceDescriptor = D_DEVICE(0x00,0x00,0x00,64,USB_VID,USB_PID,0x100,IMANUFACTURER,IPRODUCT,0,1); //#endif Config USB_ConfigDescriptor = diff --git a/bootloaders/diskloader/src/USBDesc.h b/bootloaders/diskloader/src/USBDesc.h index 589dfa9..a40bae1 100644 --- a/bootloaders/diskloader/src/USBDesc.h +++ b/bootloaders/diskloader/src/USBDesc.h @@ -53,11 +53,11 @@ extern DeviceDescriptor USB_DeviceDescriptor PROGMEM; extern DeviceDescriptor USB_DeviceDescriptorA PROGMEM; extern const u16 STRING_LANGUAGE[2] PROGMEM; -extern const u16 STRING_SERIAL[13] PROGMEM; +extern const u16 STRING_IPRODUCT[17] PROGMEM; +extern const u16 STRING_IMANUFACTURER[12] PROGMEM; -#define IMANUFACTURER 0 -#define IPRODUCT 0 -#define ISERIAL 1 // Only need this for MSC +#define IMANUFACTURER 1 +#define IPRODUCT 2 #define CDC_TX CDC_ENDPOINT_IN #define CDC_RX CDC_ENDPOINT_OUT
\ No newline at end of file |