summaryrefslogtreecommitdiffstats
path: root/utils/tcctool
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-10-21 11:00:28 +0000
committerDave Chapman <dave@dchapman.com>2007-10-21 11:00:28 +0000
commit11251f4555ceb4f7a3714676ad547174eae0a8f1 (patch)
tree451db8eea7fd69fe26568d874c9e4a3b28870735 /utils/tcctool
parenta4058aa94e3f9a82171f47fb90b2649c96999974 (diff)
downloadrockbox-11251f4555ceb4f7a3714676ad547174eae0a8f1.tar.gz
rockbox-11251f4555ceb4f7a3714676ad547174eae0a8f1.tar.bz2
rockbox-11251f4555ceb4f7a3714676ad547174eae0a8f1.zip
Add support for device-specific USB product IDs - the D2 is different to other devices.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15242 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/tcctool')
-rw-r--r--utils/tcctool/tcctool.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/utils/tcctool/tcctool.c b/utils/tcctool/tcctool.c
index a8182b6f7c..0eb3d7dad7 100644
--- a/utils/tcctool/tcctool.c
+++ b/utils/tcctool/tcctool.c
@@ -41,16 +41,17 @@ struct device_t
{
char* name;
char* label;
+ uint16_t productid;
uint32_t loadaddr;
uint32_t sdcfg;
};
static struct device_t devices[] =
{
- {"logikdax", "Logik DAX 1GB DAB/MP3 player", 0x20000000, 0x52e97410 },
- {"iaudio6", "iAudio 6", 0x20000000, 0x62e97010 },
- {"iaudio7", "iAudio 7", 0x20000000, 0x62e97010 },
- {"cowond2", "Cowon D2", 0x20000000, 0xa2e92010 }
+ {"logikdax", "Logik DAX 1GB DAB/MP3 player", 0xb021, 0x20000000, 0x52e97410 },
+ {"iaudio6", "iAudio 6", 0xb021, 0x20000000, 0x62e97010 },
+ {"iaudio7", "iAudio 7", 0xb021, 0x20000000, 0x62e97010 },
+ {"cowond2", "Cowon D2", 0xb011, 0x20000000, 0xa2e92010 }
};
#define NUM_DEVICES ((sizeof(devices) / sizeof(struct device_t)))
@@ -81,7 +82,6 @@ void print_devices(void)
/* USB IDs for USB Boot Mode */
#define TCC_VENDORID 0x140e
-#define TCC_PRODUCTID 0xb021
#define TCC_BULK_TO 1
#define TOUT 5000
@@ -173,7 +173,7 @@ void do_patching(int device, char* buf, int len)
for (tmp_dev = bus->devices; tmp_dev; tmp_dev = tmp_dev->next) {
//printf("Found Vendor %04x Product %04x\n",tmp_dev->descriptor.idVendor, tmp_dev->descriptor.idProduct);
if (tmp_dev->descriptor.idVendor == TCC_VENDORID &&
- tmp_dev->descriptor.idProduct == TCC_PRODUCTID ) {
+ tmp_dev->descriptor.idProduct == devices[device].productid) {
dev = tmp_dev;
goto found;