Mercurial > louis > kiibohd-controller
comparison Bootloader/dfu.desc.c @ 303:f9c406854bc2
Set DFU bootloader name
Fixes #22
Each (dfu) interface may have more than one a ltsetting each with their own index and name. According to the DFU_1.1 pdf section 4.2.3, "* Alternate settings can be used by an application to access additional memory segments. In this case,
it is suggested that each alternate setting employ a string descriptor to indicate the target memory
segment; e.g., 'EEPROM'." Whether or not we end up using multiple memory segments it is still good to have a descriptive name incase there are other dfu devices connected.
Edit: Fixed previous indentation
author | Rowan Decker <Smasher816@gmail.com> |
---|---|
date | Sun, 08 Mar 2015 16:59:34 -0700 |
parents | b091bb09c55f |
children | f4d4cad283c6 |
comparison
equal
deleted
inserted
replaced
281:71882cd1c362 | 303:f9c406854bc2 |
---|---|
48 .bAlternateSetting = 0, | 48 .bAlternateSetting = 0, |
49 .bNumEndpoints = 0, | 49 .bNumEndpoints = 0, |
50 .bInterfaceClass = USB_DEV_CLASS_APP, | 50 .bInterfaceClass = USB_DEV_CLASS_APP, |
51 .bInterfaceSubClass = USB_DEV_SUBCLASS_APP_DFU, | 51 .bInterfaceSubClass = USB_DEV_SUBCLASS_APP_DFU, |
52 .bInterfaceProtocol = USB_DEV_PROTO_DFU_DFU, | 52 .bInterfaceProtocol = USB_DEV_PROTO_DFU_DFU, |
53 .iInterface = 0 | 53 .iInterface = 4 |
54 }, | 54 }, |
55 | 55 |
56 .dfu = { | 56 .dfu = { |
57 .bLength = sizeof(struct dfu_desc_functional), | 57 .bLength = sizeof(struct dfu_desc_functional), |
58 .bDescriptorType = { | 58 .bDescriptorType = { |
99 static const struct usb_desc_string_t * const dfu_device_str_desc[] = { | 99 static const struct usb_desc_string_t * const dfu_device_str_desc[] = { |
100 USB_DESC_STRING_LANG_ENUS, | 100 USB_DESC_STRING_LANG_ENUS, |
101 USB_DESC_STRING(STR_MANUFACTURER), | 101 USB_DESC_STRING(STR_MANUFACTURER), |
102 USB_DESC_STRING(STR_PRODUCT), | 102 USB_DESC_STRING(STR_PRODUCT), |
103 USB_DESC_STRING(STR_SERIAL), | 103 USB_DESC_STRING(STR_SERIAL), |
104 USB_DESC_STRING(STR_ALTNAME), | |
104 NULL | 105 NULL |
105 }; | 106 }; |
106 | 107 |
107 const struct usbd_device dfu_device = { | 108 const struct usbd_device dfu_device = { |
108 .dev_desc = &dfu_device_dev_desc, | 109 .dev_desc = &dfu_device_dev_desc, |