Disable usage of USB serial descriptor when no unique one is available

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20761 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Maurus Cuelenaere 2009-04-20 20:24:23 +00:00
parent a602c23fac
commit 1ab19d0b9b

View file

@ -68,7 +68,7 @@
#define USB_SC_SCSI 0x06 /* Transparent */
#define USB_PROT_BULK 0x50 /* bulk only */
static const struct usb_device_descriptor __attribute__((aligned(2)))
static struct usb_device_descriptor __attribute__((aligned(2)))
device_descriptor=
{
.bLength = sizeof(struct usb_device_descriptor),
@ -338,16 +338,9 @@ static void set_serial_descriptor(void)
usb_string_iSerial.bLength=68;
}
#else
#warning No proper set_serial_descriptor() implementation for this target
static void set_serial_descriptor(void)
{
short* p = &usb_string_iSerial.wString[1];
int i;
for (i = 0; i < 16; i++) {
*p++ = hex[(2*i)&0xF];
*p++ = hex[(2*i+1)&0xF];
}
usb_string_iSerial.bLength=68;
device_descriptor.iSerialNumber = 0;
}
#endif