static void cmd_eeprom_list_parsed(void *parsed_result,
void *data)
{
- (void)parsed_result;
+ struct cmd_eeprom_list_result *res = parsed_result;
+
(void)data;
- eeprom_dump_cmds();
+ if (!strcmp_P(PSTR("list"), res->cmd))
+ eeprom_dump_cmds();
+ else
+ eeprom_reset();
}
const char PROGMEM str_eeprom_list_eeprom[] = "eeprom";
const parse_token_string_t PROGMEM cmd_eeprom_list_cmd =
TOKEN_STRING_INITIALIZER(struct cmd_eeprom_list_result, cmd,
str_eeprom_list_eeprom);
-const char PROGMEM str_eeprom_list_list[] = "list";
+const char PROGMEM str_eeprom_list_list[] = "list#reset";
const parse_token_string_t PROGMEM cmd_eeprom_list_action =
TOKEN_STRING_INITIALIZER(struct cmd_eeprom_list_result, action,
str_eeprom_list_list);
int8_t eeprom_insert_cmd_before(const char *str, uint8_t n);
int8_t eeprom_append_cmd(const char *str);
int8_t eeprom_delete_cmd(uint8_t n);
+void eeprom_reset(void);
#endif