From e3d1fd9bbdb789196c25bdd5eb7536cda5ba39f3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 30 Jul 2011 02:08:36 +0200 Subject: DFU: add third 'alternate configuration' for RAM load This will allow us to load code directly into RAM without going through flash. --- firmware/src/dfu/dfu.h | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'firmware/src/dfu/dfu.h') 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; }; -- cgit v1.2.3