diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-07-30 02:08:36 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-07-30 02:08:36 +0200 |
commit | e3d1fd9bbdb789196c25bdd5eb7536cda5ba39f3 (patch) | |
tree | bd40146af8128e0b7086851215475a95ed93fdef /firmware/src/dfu | |
parent | de0d7e35eed67bab478fda9eee7cb9edb1f34f04 (diff) |
DFU: add third 'alternate configuration' for RAM load
This will allow us to load code directly into RAM without going through
flash.
Diffstat (limited to 'firmware/src/dfu')
-rw-r--r-- | firmware/src/dfu/dfu.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/firmware/src/dfu/dfu.h b/firmware/src/dfu/dfu.h index a4184b4..c898197 100644 --- a/firmware/src/dfu/dfu.h +++ b/firmware/src/dfu/dfu.h @@ -61,6 +61,16 @@ .bInterfaceSubClass = 0x01, \ .bInterfaceProtocol = 0x01, \ .iInterface = 2, \ + }, { \ + .bLength = USB_DT_INTERFACE_SIZE, \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = 0x03, \ + .bAlternateSetting = 0x00, \ + .bNumEndpoints = 0x00, \ + .bInterfaceClass = 0xfe, \ + .bInterfaceSubClass = 0x01, \ + .bInterfaceProtocol = 0x01, \ + .iInterface = 3, \ }, \ } #else @@ -78,8 +88,18 @@ }, { \ .bLength = USB_DT_INTERFACE_SIZE, \ .bDescriptorType = USB_DT_INTERFACE, \ - .bInterfaceNumber = 0x02, \ - .bAlternateSetting = 0x00, \ + .bInterfaceNumber = 0x01, \ + .bAlternateSetting = 0x01, \ + .bNumEndpoints = 0x00, \ + .bInterfaceClass = 0xfe, \ + .bInterfaceSubClass = 0x01, \ + .bInterfaceProtocol = 0x01, \ + .iInterface = 0, \ + }, { \ + .bLength = USB_DT_INTERFACE_SIZE, \ + .bDescriptorType = USB_DT_INTERFACE, \ + .bInterfaceNumber = 0x01, \ + .bAlternateSetting = 0x02, \ .bNumEndpoints = 0x00, \ .bInterfaceClass = 0xfe, \ .bInterfaceSubClass = 0x01, \ @@ -98,7 +118,7 @@ struct _dfu_desc { struct usb_config_descriptor ucfg; - struct usb_interface_descriptor uif[2]; + struct usb_interface_descriptor uif[3]; struct usb_dfu_func_descriptor func_dfu; }; |