remove HELP command and add DUMP command

Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
Michel-FK 2021-04-05 09:56:15 +02:00
parent 002ad82b69
commit 4f806cd712
2 changed files with 7 additions and 3 deletions

View File

@ -79,7 +79,7 @@ static const keyword_t valid_commands[] = {
{"KEYDOWN", STATE_KEYDOWN},
{"KEYPRESS", STATE_KEYPRESS},
{"TYPE", STATE_TYPE},
{"HELP", STATE_HELP},
{"DUMP", STATE_DUMP},
{"", STATE_INVALID}
};
@ -274,6 +274,7 @@ bool parse_config_line(char *line, mapping_list_t *list,
break;
case STATE_RESET:
case STATE_DUMP:
break;
case STATE_LOAD:
@ -446,11 +447,14 @@ bool parse_config_line(char *line, mapping_list_t *list,
}
break;
case STATE_DUMP:
dump_mapping_list(list);
break;
case STATE_MAP:
case STATE_LOAD:
case STATE_SLEEP:
case STATE_TYPE:
case STATE_HELP:
break;
default:

View File

@ -74,7 +74,7 @@ typedef enum {GPIOS} button_t;
X(STATE_FUNCTION, "FUNCTION") \
X(STATE_KEY, "KEY") \
X(STATE_COMMAND, "COMMAND")\
X(STATE_HELP, "HELP") \
X(STATE_DUMP, "DUMP") \
X(STATE_INVALID, "INVALID")
/* Enumeration of the different parse states */