diff options
Diffstat (limited to 'protocol/vusb/usbdrv')
| -rw-r--r-- | protocol/vusb/usbdrv/usbdrv.c | 8 | ||||
| -rw-r--r-- | protocol/vusb/usbdrv/usbdrv.h | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/protocol/vusb/usbdrv/usbdrv.c b/protocol/vusb/usbdrv/usbdrv.c index 21ed554f8..2e8dd8756 100644 --- a/protocol/vusb/usbdrv/usbdrv.c +++ b/protocol/vusb/usbdrv/usbdrv.c | |||
| @@ -67,7 +67,7 @@ optimizing hints: | |||
| 67 | #if USB_CFG_DESCR_PROPS_STRING_0 == 0 | 67 | #if USB_CFG_DESCR_PROPS_STRING_0 == 0 |
| 68 | #undef USB_CFG_DESCR_PROPS_STRING_0 | 68 | #undef USB_CFG_DESCR_PROPS_STRING_0 |
| 69 | #define USB_CFG_DESCR_PROPS_STRING_0 sizeof(usbDescriptorString0) | 69 | #define USB_CFG_DESCR_PROPS_STRING_0 sizeof(usbDescriptorString0) |
| 70 | PROGMEM char usbDescriptorString0[] = { /* language descriptor */ | 70 | const PROGMEM char usbDescriptorString0[] = { /* language descriptor */ |
| 71 | 4, /* sizeof(usbDescriptorString0): length of descriptor in bytes */ | 71 | 4, /* sizeof(usbDescriptorString0): length of descriptor in bytes */ |
| 72 | 3, /* descriptor type */ | 72 | 3, /* descriptor type */ |
| 73 | 0x09, 0x04, /* language index (0x0409 = US-English) */ | 73 | 0x09, 0x04, /* language index (0x0409 = US-English) */ |
| @@ -77,7 +77,7 @@ PROGMEM char usbDescriptorString0[] = { /* language descriptor */ | |||
| 77 | #if USB_CFG_DESCR_PROPS_STRING_VENDOR == 0 && USB_CFG_VENDOR_NAME_LEN | 77 | #if USB_CFG_DESCR_PROPS_STRING_VENDOR == 0 && USB_CFG_VENDOR_NAME_LEN |
| 78 | #undef USB_CFG_DESCR_PROPS_STRING_VENDOR | 78 | #undef USB_CFG_DESCR_PROPS_STRING_VENDOR |
| 79 | #define USB_CFG_DESCR_PROPS_STRING_VENDOR sizeof(usbDescriptorStringVendor) | 79 | #define USB_CFG_DESCR_PROPS_STRING_VENDOR sizeof(usbDescriptorStringVendor) |
| 80 | PROGMEM int usbDescriptorStringVendor[] = { | 80 | const PROGMEM int usbDescriptorStringVendor[] = { |
| 81 | USB_STRING_DESCRIPTOR_HEADER(USB_CFG_VENDOR_NAME_LEN), | 81 | USB_STRING_DESCRIPTOR_HEADER(USB_CFG_VENDOR_NAME_LEN), |
| 82 | USB_CFG_VENDOR_NAME | 82 | USB_CFG_VENDOR_NAME |
| 83 | }; | 83 | }; |
| @@ -86,7 +86,7 @@ PROGMEM int usbDescriptorStringVendor[] = { | |||
| 86 | #if USB_CFG_DESCR_PROPS_STRING_PRODUCT == 0 && USB_CFG_DEVICE_NAME_LEN | 86 | #if USB_CFG_DESCR_PROPS_STRING_PRODUCT == 0 && USB_CFG_DEVICE_NAME_LEN |
| 87 | #undef USB_CFG_DESCR_PROPS_STRING_PRODUCT | 87 | #undef USB_CFG_DESCR_PROPS_STRING_PRODUCT |
| 88 | #define USB_CFG_DESCR_PROPS_STRING_PRODUCT sizeof(usbDescriptorStringDevice) | 88 | #define USB_CFG_DESCR_PROPS_STRING_PRODUCT sizeof(usbDescriptorStringDevice) |
| 89 | PROGMEM int usbDescriptorStringDevice[] = { | 89 | const PROGMEM int usbDescriptorStringDevice[] = { |
| 90 | USB_STRING_DESCRIPTOR_HEADER(USB_CFG_DEVICE_NAME_LEN), | 90 | USB_STRING_DESCRIPTOR_HEADER(USB_CFG_DEVICE_NAME_LEN), |
| 91 | USB_CFG_DEVICE_NAME | 91 | USB_CFG_DEVICE_NAME |
| 92 | }; | 92 | }; |
| @@ -108,7 +108,7 @@ PROGMEM int usbDescriptorStringSerialNumber[] = { | |||
| 108 | #if USB_CFG_DESCR_PROPS_DEVICE == 0 | 108 | #if USB_CFG_DESCR_PROPS_DEVICE == 0 |
| 109 | #undef USB_CFG_DESCR_PROPS_DEVICE | 109 | #undef USB_CFG_DESCR_PROPS_DEVICE |
| 110 | #define USB_CFG_DESCR_PROPS_DEVICE sizeof(usbDescriptorDevice) | 110 | #define USB_CFG_DESCR_PROPS_DEVICE sizeof(usbDescriptorDevice) |
| 111 | PROGMEM char usbDescriptorDevice[] = { /* USB device descriptor */ | 111 | const PROGMEM char usbDescriptorDevice[] = { /* USB device descriptor */ |
| 112 | 18, /* sizeof(usbDescriptorDevice): length of descriptor in bytes */ | 112 | 18, /* sizeof(usbDescriptorDevice): length of descriptor in bytes */ |
| 113 | USBDESCR_DEVICE, /* descriptor type */ | 113 | USBDESCR_DEVICE, /* descriptor type */ |
| 114 | 0x10, 0x01, /* USB version supported */ | 114 | 0x10, 0x01, /* USB version supported */ |
diff --git a/protocol/vusb/usbdrv/usbdrv.h b/protocol/vusb/usbdrv/usbdrv.h index 3a78f307b..42fe16372 100644 --- a/protocol/vusb/usbdrv/usbdrv.h +++ b/protocol/vusb/usbdrv/usbdrv.h | |||
| @@ -452,43 +452,43 @@ extern | |||
| 452 | #if !(USB_CFG_DESCR_PROPS_DEVICE & USB_PROP_IS_RAM) | 452 | #if !(USB_CFG_DESCR_PROPS_DEVICE & USB_PROP_IS_RAM) |
| 453 | PROGMEM | 453 | PROGMEM |
| 454 | #endif | 454 | #endif |
| 455 | char usbDescriptorDevice[]; | 455 | const char usbDescriptorDevice[]; |
| 456 | 456 | ||
| 457 | extern | 457 | extern |
| 458 | #if !(USB_CFG_DESCR_PROPS_CONFIGURATION & USB_PROP_IS_RAM) | 458 | #if !(USB_CFG_DESCR_PROPS_CONFIGURATION & USB_PROP_IS_RAM) |
| 459 | PROGMEM | 459 | PROGMEM |
| 460 | #endif | 460 | #endif |
| 461 | char usbDescriptorConfiguration[]; | 461 | const char usbDescriptorConfiguration[]; |
| 462 | 462 | ||
| 463 | extern | 463 | extern |
| 464 | #if !(USB_CFG_DESCR_PROPS_HID_REPORT & USB_PROP_IS_RAM) | 464 | #if !(USB_CFG_DESCR_PROPS_HID_REPORT & USB_PROP_IS_RAM) |
| 465 | PROGMEM | 465 | PROGMEM |
| 466 | #endif | 466 | #endif |
| 467 | char usbDescriptorHidReport[]; | 467 | const char usbDescriptorHidReport[]; |
| 468 | 468 | ||
| 469 | extern | 469 | extern |
| 470 | #if !(USB_CFG_DESCR_PROPS_STRING_0 & USB_PROP_IS_RAM) | 470 | #if !(USB_CFG_DESCR_PROPS_STRING_0 & USB_PROP_IS_RAM) |
| 471 | PROGMEM | 471 | PROGMEM |
| 472 | #endif | 472 | #endif |
| 473 | char usbDescriptorString0[]; | 473 | const char usbDescriptorString0[]; |
| 474 | 474 | ||
| 475 | extern | 475 | extern |
| 476 | #if !(USB_CFG_DESCR_PROPS_STRING_VENDOR & USB_PROP_IS_RAM) | 476 | #if !(USB_CFG_DESCR_PROPS_STRING_VENDOR & USB_PROP_IS_RAM) |
| 477 | PROGMEM | 477 | PROGMEM |
| 478 | #endif | 478 | #endif |
| 479 | int usbDescriptorStringVendor[]; | 479 | const int usbDescriptorStringVendor[]; |
| 480 | 480 | ||
| 481 | extern | 481 | extern |
| 482 | #if !(USB_CFG_DESCR_PROPS_STRING_PRODUCT & USB_PROP_IS_RAM) | 482 | #if !(USB_CFG_DESCR_PROPS_STRING_PRODUCT & USB_PROP_IS_RAM) |
| 483 | PROGMEM | 483 | PROGMEM |
| 484 | #endif | 484 | #endif |
| 485 | int usbDescriptorStringDevice[]; | 485 | const int usbDescriptorStringDevice[]; |
| 486 | 486 | ||
| 487 | extern | 487 | extern |
| 488 | #if !(USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER & USB_PROP_IS_RAM) | 488 | #if !(USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER & USB_PROP_IS_RAM) |
| 489 | PROGMEM | 489 | PROGMEM |
| 490 | #endif | 490 | #endif |
| 491 | int usbDescriptorStringSerialNumber[]; | 491 | const int usbDescriptorStringSerialNumber[]; |
| 492 | 492 | ||
| 493 | #endif /* __ASSEMBLER__ */ | 493 | #endif /* __ASSEMBLER__ */ |
| 494 | 494 | ||
