diff options
Diffstat (limited to 'avr')
-rw-r--r-- | avr/cmd_attach.c | 4 | ||||
-rw-r--r-- | avr/cmd_boot.c | 3 | ||||
-rw-r--r-- | avr/cmd_date.c | 4 | ||||
-rw-r--r-- | avr/cmd_fat.c | 4 | ||||
-rw-r--r-- | avr/cmd_gpio.c | 5 | ||||
-rw-r--r-- | avr/cmd_loadcpm3.c | 5 | ||||
-rw-r--r-- | avr/cmd_loadihex.c | 5 | ||||
-rw-r--r-- | avr/cmd_misc.c | 3 | ||||
-rw-r--r-- | avr/cmd_run.c | 6 | ||||
-rw-r--r-- | avr/cmd_sd.c | 4 | ||||
-rw-r--r-- | avr/command.c | 2 | ||||
-rw-r--r-- | avr/command_tbl.c | 44 | ||||
-rw-r--r-- | avr/env.c | 7 | ||||
-rw-r--r-- | avr/eval_arg.c | 4 |
14 files changed, 25 insertions, 75 deletions
diff --git a/avr/cmd_attach.c b/avr/cmd_attach.c index 361ba6d..fcc4f49 100644 --- a/avr/cmd_attach.c +++ b/avr/cmd_attach.c @@ -8,9 +8,7 @@ * attach channels to devices */ -#include "common.h" -#include <string.h> -#include <stdbool.h> +#include "cmd_attach.h" #include "command.h" #include "z180-serv.h" diff --git a/avr/cmd_boot.c b/avr/cmd_boot.c index 6e117d9..b4aa5c0 100644 --- a/avr/cmd_boot.c +++ b/avr/cmd_boot.c @@ -10,11 +10,10 @@ /* * Misc boot support */ -#include "common.h" +#include "cmd_boot.h" #include <ctype.h> #include <util/atomic.h> -#include "command.h" #include "cli_readline.h" /* console_buffer[] */ #include "cli.h" /* run_command() */ #include "env.h" diff --git a/avr/cmd_date.c b/avr/cmd_date.c index 91a3d44..cbc4a32 100644 --- a/avr/cmd_date.c +++ b/avr/cmd_date.c @@ -10,11 +10,9 @@ /* * RTC, Date & Time support: get and set date & time */ -#include "common.h" -#include <string.h> +#include "cmd_date.h" #include "time.h" #include "rtc.h" -#include "command.h" /* diff --git a/avr/cmd_fat.c b/avr/cmd_fat.c index bb0eca1..76304bc 100644 --- a/avr/cmd_fat.c +++ b/avr/cmd_fat.c @@ -9,11 +9,7 @@ */ #include "cmd_fat.h" -#include "common.h" -#include <string.h> -#include <stdbool.h> -#include "command.h" #include "ff.h" #include "z80-if.h" #include "eval_arg.h" diff --git a/avr/cmd_gpio.c b/avr/cmd_gpio.c index 5d7eb6c..8f50ca3 100644 --- a/avr/cmd_gpio.c +++ b/avr/cmd_gpio.c @@ -4,12 +4,9 @@ * SPDX-License-Identifier: GPL-2.0 */ -#include "common.h" -#include <stdlib.h> -#include <string.h> +#include "cmd_gpio.h" #include <ctype.h> -#include "command.h" #include "print-utils.h" #include "getopt-min.h" #include "env.h" diff --git a/avr/cmd_loadcpm3.c b/avr/cmd_loadcpm3.c index f847290..39e3278 100644 --- a/avr/cmd_loadcpm3.c +++ b/avr/cmd_loadcpm3.c @@ -8,12 +8,9 @@ * See CP/M 3 System Manual, Appendix D: CPM3.SYS File Format */ -#include "common.h" +#include "cmd_loadcpm3.h" #include <ctype.h> -#include <string.h> -#include <stdbool.h> -#include "command.h" #include "env.h" #include "ff.h" #include "eval_arg.h" diff --git a/avr/cmd_loadihex.c b/avr/cmd_loadihex.c index ee4b40b..2c0fa9e 100644 --- a/avr/cmd_loadihex.c +++ b/avr/cmd_loadihex.c @@ -4,12 +4,9 @@ * SPDX-License-Identifier: GPL-2.0 */ -#include "common.h" -#include <stdlib.h> +#include "cmd_loadihex.h" #include <ctype.h> -#include <stdbool.h> -#include "command.h" #include "con-utils.h" #include "z80-if.h" #include "debug.h" diff --git a/avr/cmd_misc.c b/avr/cmd_misc.c index a0ee26e..a88ba72 100644 --- a/avr/cmd_misc.c +++ b/avr/cmd_misc.c @@ -7,11 +7,10 @@ * SPDX-License-Identifier: GPL-2.0 */ -#include "common.h" +#include "cmd_misc.h" #include "eval_arg.h" #include <stdbool.h> -#include "command.h" #include "timer.h" #include "con-utils.h" #include "getopt-min.h" diff --git a/avr/cmd_run.c b/avr/cmd_run.c index 719b9a8..9c6f20f 100644 --- a/avr/cmd_run.c +++ b/avr/cmd_run.c @@ -4,13 +4,9 @@ * SPDX-License-Identifier: GPL-2.0 */ -#include "common.h" -#include <string.h> -#include <stdio.h> +#include "cmd_run.h" #include "ff.h" -#include "config.h" -#include "command.h" #include "cli_readline.h" /* console_buffer[] */ #include "cli.h" /* run_command() */ #include "env.h" diff --git a/avr/cmd_sd.c b/avr/cmd_sd.c index 9cd664b..366bdfc 100644 --- a/avr/cmd_sd.c +++ b/avr/cmd_sd.c @@ -4,10 +4,8 @@ * SPDX-License-Identifier: GPL-2.0 */ -#include "common.h" -//#include <stdlib.h> +#include "cmd_sd.h" -#include "command.h" #include "diskio.h" #include "ff.h" #include "eval_arg.h" diff --git a/avr/command.c b/avr/command.c index 938edc3..b9c5e56 100644 --- a/avr/command.c +++ b/avr/command.c @@ -497,6 +497,8 @@ command_ret_t cmd_call(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, char * con return result; } +#pragma GCC diagnostic ignored "-Wclobbered" + command_ret_t cmd_process(uint_fast8_t flag, int argc, char * const argv[], uint_fast8_t *repeatable) { diff --git a/avr/command_tbl.c b/avr/command_tbl.c index 1b34ec1..ce06081 100644 --- a/avr/command_tbl.c +++ b/avr/command_tbl.c @@ -7,39 +7,19 @@ #include "common.h" #include "command.h" #include "cmd_mem.h" +#include "cmd_boot.h" +#include "cmd_misc.h" +#include "cmd_date.h" +#include "cmd_run.h" +#include "cmd_loadcpm3.h" +#include "cmd_loadihex.h" +#include "cmd_gpio.h" +#include "cmd_sd.h" +#include "cmd_fat.h" +#include "cmd_attach.h" +#include "env.h" +#include "debug.h" -extern command_ret_t do_echo(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_sleep(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_env_print(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_env_default(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_env_set(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_env_save(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_loadf(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_bootcf(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_loadcpm3(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_loadihex(cmd_tbl_t *, uint_fast8_t, int, char * const []); -#if defined(CONFIG_CMD_LOADB) -extern command_ret_t do_load_serial_bin(cmd_tbl_t *, uint_fast8_t, int, char * const []); -#endif -extern command_ret_t do_go(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_restart(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_console(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_dump_mem(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_mem_mm_avr(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_mem_nm_avr(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_eep_cp(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_busreq_pulse(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_date(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_gpio(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_sd(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_fat(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_run(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_source(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_attach(cmd_tbl_t *, uint_fast8_t, int, char * const []); -extern command_ret_t do_pr_free_avr(cmd_tbl_t *, uint_fast8_t, int, char * const []); - -extern cmd_tbl_t cmd_tbl_fat[]; -extern cmd_tbl_t cmd_tbl_sd[]; cmd_tbl_t cmd_tbl[] = { @@ -4,10 +4,7 @@ * SPDX-License-Identifier: GPL-2.0 */ -#include "common.h" -#include <string.h> -#include <stdlib.h> -#include <stdbool.h> +#include "env.h" #include <avr/eeprom.h> #include "config.h" @@ -15,8 +12,6 @@ #include "xmalloc.h" #include "crc.h" #include "getopt-min.h" -#include "command.h" -#include "env.h" #define ENV_SIZE (CONFIG_ENV_SIZE - sizeof(uint16_t) -1) diff --git a/avr/eval_arg.c b/avr/eval_arg.c index b931509..fd8b067 100644 --- a/avr/eval_arg.c +++ b/avr/eval_arg.c @@ -5,12 +5,10 @@ */ #include "eval_arg.h" -#include "common.h" -#include <stdlib.h> +#include "command.h" /* jump_buf */ #include <ctype.h> #include <setjmp.h> #include "print-utils.h" -#include "command.h" /* jump_buf */ static jmp_buf eval_jbuf; static char ch; |