X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao_cmd.c;h=f0459a73fd4976b17b6077328d2c2b2c8ea13516;hp=91abe7f08837c6d321aecc038c868d6daf7ee1aa;hb=beae3360828da21eb1a3c4f88e930f242d4e36b7;hpb=38a0b61b0a0b3c00f064c8d562950a17a6ddff4a diff --git a/ao_cmd.c b/ao_cmd.c index 91abe7f0..f0459a73 100644 --- a/ao_cmd.c +++ b/ao_cmd.c @@ -18,20 +18,20 @@ #include "ao.h" __xdata uint16_t ao_cmd_lex_i; -__xdata uint8_t ao_cmd_lex_c; +__xdata char ao_cmd_lex_c; __xdata enum ao_cmd_status ao_cmd_status; static __xdata uint8_t lex_echo; #define CMD_LEN 32 -static __xdata uint8_t cmd_line[CMD_LEN]; +static __xdata char cmd_line[CMD_LEN]; static __xdata uint8_t cmd_len; static __xdata uint8_t cmd_i; static void put_string(char *s) { - __xdata uint8_t c; + __xdata char c; while (c = *s++) putchar(c); } @@ -39,7 +39,7 @@ put_string(char *s) static void readline(void) { - __xdata uint8_t c; + __xdata char c; if (lex_echo) put_string("> "); cmd_len = 0; @@ -212,9 +212,9 @@ echo(void) lex_echo = ao_cmd_lex_i != 0; } -static const uint8_t help_txt[] = "All numbers are in hex"; +static const char help_txt[] = "All numbers are in hex"; -#define NUM_CMDS 10 +#define NUM_CMDS 11 static __code struct ao_cmds *__xdata (ao_cmds[NUM_CMDS]); static __xdata uint8_t ao_ncmds; @@ -256,7 +256,7 @@ ao_cmd_register(__code struct ao_cmds *cmds) void ao_cmd(void *parameters) { - __xdata uint8_t c; + __xdata char c; __xdata uint8_t cmd, cmds; __code struct ao_cmds * __xdata cs; void (*__xdata func)(void);