FreeCalypso > hg > freecalypso-sw
comparison loadtools/hwparam.c @ 382:a2210b0361c1
loadtools: implemented compal-stage setting in hw parameter files
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 09 Jun 2014 21:53:12 +0000 |
parents | 278052b6afda |
children | 1ed2d78f150c |
comparison
equal
deleted
inserted
replaced
381:837ba1b47478 | 382:a2210b0361c1 |
---|---|
14 | 14 |
15 extern void set_default_exit_mode(); | 15 extern void set_default_exit_mode(); |
16 extern void set_flash_device(); | 16 extern void set_flash_device(); |
17 | 17 |
18 char hw_init_script[128]; | 18 char hw_init_script[128]; |
19 | |
20 static void | |
21 handle_compal_stage(arg, filename_for_errs, lineno_for_errs) | |
22 char *arg; | |
23 char *filename_for_errs; | |
24 int lineno_for_errs; | |
25 { | |
26 char *cp; | |
27 | |
28 while (isspace(*arg)) | |
29 arg++; | |
30 if (!*arg) { | |
31 fprintf(stderr, | |
32 "%s line %d: compal-stage setting requires an argument\n", | |
33 filename_for_errs, lineno_for_errs); | |
34 exit(1); | |
35 } | |
36 for (cp = arg; *cp && !isspace(*cp); cp++) | |
37 ; | |
38 *cp = '\0'; | |
39 set_compalstage_short(arg); | |
40 } | |
19 | 41 |
20 static void | 42 static void |
21 handle_init_script(arg, filename_for_errs, lineno_for_errs) | 43 handle_init_script(arg, filename_for_errs, lineno_for_errs) |
22 char *arg; | 44 char *arg; |
23 char *filename_for_errs; | 45 char *filename_for_errs; |
105 | 127 |
106 static struct cmdtab { | 128 static struct cmdtab { |
107 char *name; | 129 char *name; |
108 void (*func)(); | 130 void (*func)(); |
109 } cmdtab[] = { | 131 } cmdtab[] = { |
132 {"compal-stage", handle_compal_stage}, | |
110 {"exit-mode", set_default_exit_mode}, | 133 {"exit-mode", set_default_exit_mode}, |
111 {"flash", set_flash_device}, | 134 {"flash", set_flash_device}, |
112 {"init-script", handle_init_script}, | 135 {"init-script", handle_init_script}, |
113 {"pll-config", handle_pll_config}, | 136 {"pll-config", handle_pll_config}, |
114 {"rhea-cntl", handle_rhea_cntl}, | 137 {"rhea-cntl", handle_rhea_cntl}, |