comparison loadtools/ltdispatch.c @ 36:65111e6eee9e

loadtool: dump2bin and dump2srec implemented
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 06 May 2013 02:04:56 +0000
parents 05af070c4b60
children b015036286f3
comparison
equal deleted inserted replaced
35:05af070c4b60 36:65111e6eee9e
7 #include <string.h> 7 #include <string.h>
8 #include <strings.h> 8 #include <strings.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
11 extern int cmd_crc32(); 11 extern int cmd_crc32();
12 extern int cmd_dump2bin();
13 extern int cmd_dump2srec();
12 extern int cmd_exec(); 14 extern int cmd_exec();
13 extern int cmd_exit(); 15 extern int cmd_exit();
14 extern int loadtool_cmd_passthru(); 16 extern int loadtool_cmd_passthru();
15 17
16 static struct cmdtab { 18 static struct cmdtab {
19 int maxargs; 21 int maxargs;
20 int (*func)(); 22 int (*func)();
21 } cmdtab[] = { 23 } cmdtab[] = {
22 {"crc32", 2, 2, cmd_crc32}, 24 {"crc32", 2, 2, cmd_crc32},
23 {"dump", 2, 2, loadtool_cmd_passthru}, 25 {"dump", 2, 2, loadtool_cmd_passthru},
26 {"dump2bin", 3, 3, cmd_dump2bin},
27 {"dump2srec", 3, 3, cmd_dump2srec},
24 {"exec", 1, 1, cmd_exec}, 28 {"exec", 1, 1, cmd_exec},
25 {"exit", 0, 1, cmd_exit}, 29 {"exit", 0, 1, cmd_exit},
26 {"quit", 0, 1, cmd_exit}, 30 {"quit", 0, 1, cmd_exit},
27 {"r8", 1, 1, loadtool_cmd_passthru}, 31 {"r8", 1, 1, loadtool_cmd_passthru},
28 {"r16", 1, 1, loadtool_cmd_passthru}, 32 {"r16", 1, 1, loadtool_cmd_passthru},