const int len = cmd_tbl_item_count();
return _do_help(cmd_tbl, len, cmdtp, flag, argc, argv);
}
-
-
-#if 0
-
-U_BOOT_CMD(
- help, CONFIG_SYS_MAXARGS, 1, do_help,
- "print command description/usage",
- "\n"
- " - print brief description of all commands\n"
- "help command ...\n"
- " - print detailed usage of 'command'"
-);
-
-/* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
-ll_entry_declare(cmd_tbl_t, question_mark, cmd) = {
- "?", CONFIG_SYS_MAXARGS, 1, do_help,
- "alias for 'help'",
-#ifdef CONFIG_SYS_LONGHELP
- ""
-#endif /* CONFIG_SYS_LONGHELP */
-};
-
-#endif
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include <stdio.h>
#include "config.h"
#include "print-utils.h"
{
unsigned char c1, c2;
- while ((c1 = *(const FLASH unsigned char *)s1++)
+ while ((c1 = *(const FLASH unsigned char *)s1++)
== (c2 = *(const FLASH unsigned char *)s2++))
if (c1 == 0)
return 0;
return c1 - c2;
}
-int cmpstringp(const void *p1, const void *p2)
+int cmpstring_PP(const void *p1, const void *p2)
{
- return strcmp_PP((*(const FLASH cmd_tbl_t **) p1)->name,
+ return strcmp_PP((*(const FLASH cmd_tbl_t **) p1)->name,
(*(const FLASH cmd_tbl_t **) p2)->name);
}
}
/* Sort command list */
- qsort(cmd_array, cmd_items, sizeof (cmd_tbl_t *), cmpstringp);
+ qsort(cmd_array, cmd_items, sizeof (cmd_tbl_t *), cmpstring_PP);
/* print short help (usage) */
for (i = 0; i < cmd_items; i++) {
return CMD_RET_FAILURE;
if (usage == NULL)
continue;
-#ifdef GCC_BUG_61443
+#ifdef GCC_BUG_61443
print_usage_line(cmd_array[i]->name, max_len, usage);
#else
- printf_P(PSTR("%-" stringify(8) /*FIXME*/ "S - %S\n"),
+ printf_P(PSTR("%-" stringify(8) /*FIXME*/ "S - %S\n"),
cmd_array[i]->name, usage);
#endif
}
"addr1 addr2 count"
),
CMD_TBL_ITEM(
- base, 2, 1, do_mem_base,
+ base, 2, 0, do_mem_base,
"print or set address offset",
"\n"
" - print address offset for memory commands\n"
int my_getchar(uint_fast8_t waitforchar)
{
int c;
-
+
do {
bg_shed();
c = serial_getc();
{
ctrlc_was_pressed = 0;
}
-
#include "env.h"
#include "z180-serv.h"
#include "spi.h"
+#include "gpio.h"
static uint8_t mcusr;
{
setup_avr();
z80_setup_bus();
-
+ for (int i = 0; i < GPIO_MAX; i++)
+ gpio_config(i, INPUT_PULLUP);
env_init();
if (reset_reason_is_power_on())
/*--------------------------------------------------------------------------*/
-#if 0
-void dump_mem(const FLASH uint8_t *addr, uint32_t len)
-{
- DBG_P(1, "hdrom dump:");
- while (len) {
- DBG_P(1, "\n %.5x:", addr);
- for (unsigned i = 0; i<16; i++)
- DBG_P(1, " %.2x", *addr++);
- len -= len > 16 ? 16 : len;
- }
- DBG_P(1, "\n");
-}
-#endif
-/*--------------------------------------------------------------------------*/
-
-
const FLASH uint8_t iniprog[] = {
0xAF, // xor a
0xED, 0x39, 0x36, // out0 (rcr),a ;disable DRAM refresh
0x00, // db 0 ;dst
0x00, 0x00, // dw 0 ;count (64k)
};
-
-
-