|
@@ -274,6 +274,18 @@ static void cmd_toggle_giveback(BaseSequentialStream *chp, int argc, char *argv[
|
274
|
274
|
tmpcfg.flags ^= PDBS_CONFIG_FLAGS_GIVEBACK;
|
275
|
275
|
}
|
276
|
276
|
|
|
277
|
+static void cmd_toggle_hv_preferred(BaseSequentialStream *chp, int argc, char *argv[])
|
|
278
|
+{
|
|
279
|
+ (void) argv;
|
|
280
|
+ if (argc > 0) {
|
|
281
|
+ chprintf(chp, "Usage: toggle_hv_preferred\r\n");
|
|
282
|
+ return;
|
|
283
|
+ }
|
|
284
|
+
|
|
285
|
+ /* Toggle the HV_Preferred flag */
|
|
286
|
+ tmpcfg.flags ^= PDBS_CONFIG_FLAGS_HV_PREFERRED;
|
|
287
|
+}
|
|
288
|
+
|
277
|
289
|
static void cmd_set_v(BaseSequentialStream *chp, int argc, char *argv[])
|
278
|
290
|
{
|
279
|
291
|
if (argc != 1) {
|
|
@@ -397,6 +409,7 @@ static const struct pdbs_shell_cmd commands[] = {
|
397
|
409
|
{"get_tmpcfg", cmd_get_tmpcfg, "Print the configuration buffer"},
|
398
|
410
|
{"clear_flags", cmd_clear_flags, "Clear all flags"},
|
399
|
411
|
{"toggle_giveback", cmd_toggle_giveback, "Toggle the GiveBack flag"},
|
|
412
|
+ {"toggle_hv_preferred", cmd_toggle_hv_preferred, "Toggle the HV_Preferred flag"},
|
400
|
413
|
/* TODO {"toggle_var_bat", cmd_toggle_var_bat, "Toggle the Var/Bat flag"},*/
|
401
|
414
|
{"set_v", cmd_set_v, "Set the voltage in millivolts"},
|
402
|
415
|
{"set_i", cmd_set_i, "Set the current in milliamps"},
|