X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debug%2Fcli%2Fcli.c;h=bcb89fced4ccd7e00601cb3f513c2c2a4a6d6d15;hb=a3d854fde3db30886ce8f25d09e0abafd52f42b2;hp=e91046903cd32f6d2bda1d669bef67a3e46f941a;hpb=a6edcce5f991dd1511acd55fa208578f7b063431;p=kiibohd-controller.git diff --git a/Debug/cli/cli.c b/Debug/cli/cli.c index e910469..bcb89fc 100644 --- a/Debug/cli/cli.c +++ b/Debug/cli/cli.c @@ -35,6 +35,7 @@ // ----- Variables ----- // Basic command dictionary +CLIDict_Entry( clear, "Clear the screen."); CLIDict_Entry( cliDebug, "Enables/Disables hex output of the most recent cli input." ); CLIDict_Entry( help, "You're looking at it :P" ); CLIDict_Entry( led, "Enables/Disables indicator LED. Try a couple times just in case the LED is in an odd state.\r\n\t\t\033[33mWarning\033[0m: May adversely affect some modules..." ); @@ -44,6 +45,7 @@ CLIDict_Entry( restart, "Sends a software restart, should be similar to powerin CLIDict_Entry( version, "Version information about this firmware." ); CLIDict_Def( basicCLIDict, "General Commands" ) = { + CLIDict_Item( clear ), CLIDict_Item( cliDebug ), CLIDict_Item( help ), CLIDict_Item( led ), @@ -350,6 +352,11 @@ inline void CLI_tabCompletion() // ----- CLI Command Functions ----- +void cliFunc_clear( char* args) +{ + print("\033[2J\033[H\r"); // Erases the whole screen +} + void cliFunc_cliDebug( char* args ) { // Toggle Hex Debug Mode