From 11251f4555ceb4f7a3714676ad547174eae0a8f1 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sun, 21 Oct 2007 11:00:28 +0000 Subject: 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 --- utils/tcctool/tcctool.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'utils/tcctool') 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; -- cgit v1.2.3