Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
firmware/ci: small cleanup
- fix indent in help
- revert separations in help
- remove "unknown command" printf: this is implicit since all valid commands are required to generate an output
- disable status with an invalid command or when pressing enter
  • Loading branch information
enjoy-digital committed Sep 8, 2015
1 parent 4fc6a23 commit 2b9a864
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions firmware/lm32/ci.c
Expand Up @@ -37,14 +37,14 @@ static void help_hdp_toggle(void)

static void help_output0(void)
{
puts("output0 on - enable output0");
puts("output0 off - disable output0");
puts("output0 on - enable output0");
puts("output0 off - disable output0");
}

static void help_output1(void)
{
puts("output1 on - enable output1");
puts("output1 off - disable output1");
puts("output1 on - enable output1");
puts("output1 off - disable output1");
}

#ifdef ENCODER_BASE
Expand All @@ -70,12 +70,18 @@ static void help(void)
puts("status <on/off> - enable/disable status message (same with by pressing enter)");
puts("");
help_video_matrix();
puts("");
help_video_mode();
puts("");
help_hdp_toggle();
puts("");
help_output0();
puts("");
help_output1();
puts("");
#ifdef ENCODER_BASE
help_encoder();
puts("");
#endif
help_debug();
}
Expand Down Expand Up @@ -529,9 +535,10 @@ void ci_service(void)
debug_ddr();
else
help_debug();
} else {
if(status_enabled)
status_disable();
}
else
printf("Unknown command: '%s'\n", token);

ci_prompt();
}

0 comments on commit 2b9a864

Please sign in to comment.