|
@@ -165,6 +165,18 @@ static void cmd_get_tmpcfg(BaseSequentialStream *chp, int argc, char *argv[])
|
165
|
165
|
pdb_config_print(chp, &tmpcfg);
|
166
|
166
|
}
|
167
|
167
|
|
|
168
|
+static void cmd_clear_flags(BaseSequentialStream *chp, int argc, char *argv[])
|
|
169
|
+{
|
|
170
|
+ (void) argv;
|
|
171
|
+ if (argc > 0) {
|
|
172
|
+ chprintf(chp, "Usage: clear_flags\r\n");
|
|
173
|
+ return;
|
|
174
|
+ }
|
|
175
|
+
|
|
176
|
+ /* Clear all flags */
|
|
177
|
+ tmpcfg.flags = 0;
|
|
178
|
+}
|
|
179
|
+
|
168
|
180
|
static void cmd_toggle_giveback(BaseSequentialStream *chp, int argc, char *argv[])
|
169
|
181
|
{
|
170
|
182
|
(void) argv;
|
|
@@ -232,6 +244,7 @@ static const struct pdb_shell_cmd commands[] = {
|
232
|
244
|
{"load", cmd_load, "Load the stored configuration into the buffer"},
|
233
|
245
|
{"get_cfg", cmd_get_cfg, "Print the stored configuration"},
|
234
|
246
|
{"get_tmpcfg", cmd_get_tmpcfg, "Print the configuration buffer"},
|
|
247
|
+ {"clear_flags", cmd_clear_flags, "Clear all flags"},
|
235
|
248
|
{"toggle_giveback", cmd_toggle_giveback, "Toggle the GiveBack flag"},
|
236
|
249
|
/* TODO {"toggle_var_bat", cmd_toggle_var_bat, "Toggle the Var/Bat flag"},*/
|
237
|
250
|
{"set_v", cmd_set_v, "Set the voltage in millivolts"},
|