summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-10-20 21:00:34 +0000
committerDave Chapman <dave@dchapman.com>2007-10-20 21:00:34 +0000
commit2c816d16c9ded0fffeb26d06209cef665a0d0424 (patch)
tree22aab22d68af28cad210ab71bc4c94034092e9d3
parent4991cd377e15c61069cd9ab83b3cf90b0a95efcd (diff)
downloadrockbox-2c816d16c9ded0fffeb26d06209cef665a0d0424.tar.gz
rockbox-2c816d16c9ded0fffeb26d06209cef665a0d0424.zip
Untested support for the Cowon D2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15228 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--utils/tcctool/tcctool.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/tcctool/tcctool.c b/utils/tcctool/tcctool.c
index 22e6f1066d..a8182b6f7c 100644
--- a/utils/tcctool/tcctool.c
+++ b/utils/tcctool/tcctool.c
@@ -42,14 +42,15 @@ struct device_t
42 char* name; 42 char* name;
43 char* label; 43 char* label;
44 uint32_t loadaddr; 44 uint32_t loadaddr;
45 uint32_t magic; 45 uint32_t sdcfg;
46}; 46};
47 47
48static struct device_t devices[] = 48static struct device_t devices[] =
49{ 49{
50 {"logikdax", "Logik DAX 1GB DAB/MP3 player", 0x20000000, 0x52e97410 }, 50 {"logikdax", "Logik DAX 1GB DAB/MP3 player", 0x20000000, 0x52e97410 },
51 {"iaudio6", "iAudio 6", 0x20000000, 0x62e97010 }, 51 {"iaudio6", "iAudio 6", 0x20000000, 0x62e97010 },
52 {"iaudio7", "iAudio 7", 0x20000000, 0x62e97010 } 52 {"iaudio7", "iAudio 7", 0x20000000, 0x62e97010 },
53 {"cowond2", "Cowon D2", 0x20000000, 0xa2e92010 }
53}; 54};
54 55
55#define NUM_DEVICES ((sizeof(devices) / sizeof(struct device_t))) 56#define NUM_DEVICES ((sizeof(devices) / sizeof(struct device_t)))
@@ -104,13 +105,13 @@ int upload_app(usb_dev_handle* dh, int device, char* p, int len)
104 int err; 105 int err;
105 int i; 106 int i;
106 107
107 /* Send the header - Destination address, length and magic value */ 108 /* Send the header - Destination address, length and SDCFG value */
108 memset(buf, 0, PACKET_SIZE); 109 memset(buf, 0, PACKET_SIZE);
109 110
110 put_int32le(0xf0000000, buf); /* Unknown - always the same */ 111 put_int32le(0xf0000000, buf); /* Unknown - always the same */
111 put_int32le(len / PACKET_SIZE, buf + 4); 112 put_int32le(len / PACKET_SIZE, buf + 4);
112 put_int32le(devices[device].loadaddr, buf + 8); 113 put_int32le(devices[device].loadaddr, buf + 8);
113 put_int32le(devices[device].magic, buf + 12); 114 put_int32le(devices[device].sdcfg, buf + 12);
114 115
115 err = usb_bulk_write(dh, TCC_BULK_TO, buf, PACKET_SIZE, TOUT); 116 err = usb_bulk_write(dh, TCC_BULK_TO, buf, PACKET_SIZE, TOUT);
116 117