diff options
| author | Frank Gevaerts <frank@gevaerts.be> | 2008-11-30 15:43:15 +0000 |
|---|---|---|
| committer | Frank Gevaerts <frank@gevaerts.be> | 2008-11-30 15:43:15 +0000 |
| commit | caaf3c0b97b59117cacd221ed4557b2fd351b5b3 (patch) | |
| tree | 476ae3869a0d20821b2cf3afd1e5ab737299878a /firmware/usbstack | |
| parent | 5f7db212d591213ae98d7b051b828bc65b792f2a (diff) | |
| download | rockbox-caaf3c0b97b59117cacd221ed4557b2fd351b5b3.zip rockbox-caaf3c0b97b59117cacd221ed4557b2fd351b5b3.tar.gz rockbox-caaf3c0b97b59117cacd221ed4557b2fd351b5b3.tar.bz2 rockbox-caaf3c0b97b59117cacd221ed4557b2fd351b5b3.tar.xz | |
Move tcc77x/usb-tcc77x.c to usb-tcc.c as it is more general than just tcc77x (even usb-tcc is too specific, but I don't know anything better)
Add #if0ed USB defines to config-cowond2.h, so experimenting with USB is easy
Add dummy set_serial_descriptor() implementation to usb_core.c. This one doesn't generate a unique serial, so it must never be used for non-testing purposes. When usaed, a compiler warning will be generated
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19273 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack')
| -rw-r--r-- | firmware/usbstack/usb_core.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c index 6003c8d..5f22d87 100644 --- a/firmware/usbstack/usb_core.c +++ b/firmware/usbstack/usb_core.c @@ -314,7 +314,17 @@ static void set_serial_descriptor(void) usb_string_iSerial.bLength=68; } #else -#error No set_serial_descriptor() implementation for this target +#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; +} #endif void usb_core_init(void) |