freemyipod r696 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r695‎ | r696 | r697 >
Date:21:26, 23 April 2011
Author:theseven
Status:new
Tags:
Comment:
emCORE: Change USB vendor string to "freemyipod.org"
Modified paths:
  • /emcore/trunk/usb/usb.c (modified) (history)

Diff [purge]

Index: emcore/trunk/usb/usb.c
@@ -209,8 +209,15 @@
210210 }
211211 };
212212
213 -static struct usb_string_descriptor CACHEALIGN_ATTR string_devicename =
 213+static struct usb_string_descriptor CACHEALIGN_ATTR string_vendor =
214214 {
 215+ 30,
 216+ USB_DT_STRING,
 217+ {'f', 'r', 'e', 'e', 'm', 'y', 'i', 'p', 'o', 'd', '.', 'o', 'r', 'g'}
 218+};
 219+
 220+static struct usb_string_descriptor CACHEALIGN_ATTR string_product =
 221+{
215222 32,
216223 USB_DT_STRING,
217224 {'e', 'm', 'C', 'O', 'R', 'E', ' ', 'D', 'e', 'b', 'u', 'g', 'g', 'e', 'r'}
@@ -264,6 +271,7 @@
265272 size = sizeof(device_descriptor);
266273 break;
267274 case USB_DT_OTHER_SPEED_CONFIG:
 275+
268276 case USB_DT_CONFIG:
269277 if ((req->wValue >> 8) == USB_DT_CONFIG)
270278 {
@@ -294,14 +302,12 @@
295303 size = lang_descriptor.bLength;
296304 break;
297305 case 1:
298 - string_devicename.bLength = 14;
299 - addr = &string_devicename;
300 - size = string_devicename.bLength;
 306+ addr = &string_vendor;
 307+ size = string_vendor.bLength;
301308 break;
302309 case 2:
303 - string_devicename.bLength = 32;
304 - addr = &string_devicename;
305 - size = string_devicename.bLength;
 310+ addr = &string_product;
 311+ size = string_product.bLength;
306312 break;
307313 }
308314 break;