HUGE AVR RAM optimization (~28%).
- It's possible to get even more, but this is probably as far as I'll go - PROGMEM is really annoying to use, and makes the code look like ass - Now the Teensy 2++ should have enough RAM to use PartialMap easily
This commit is contained in:
parent
22abefcf1e
commit
6e4c28ef84
10 changed files with 152 additions and 72 deletions
|
@ -144,17 +144,24 @@ void recovery( uint8_t on );
|
|||
// ----- Variables -----
|
||||
|
||||
// Scan Module command dictionary
|
||||
const char scanCLIDictName[] = "DPH Module Commands";
|
||||
const CLIDictItem scanCLIDict[] = {
|
||||
{ "echo", "Example command, echos the arguments.", cliFunc_echo },
|
||||
{ "avgDebug", "Enables/Disables averaging results." NL "\t\tDisplays each average, starting from Key 0x00, ignoring 0 valued averages.", cliFunc_avgDebug },
|
||||
{ "keyDebug", "Enables/Disables long debug for each keypress." NL "\t\tkeycode - [strobe:mux] : sense val : threshold+delta=total : margin", cliFunc_keyDebug },
|
||||
{ "pressDebug", "Enables/Disables short debug for each keypress.", cliFunc_pressDebug },
|
||||
{ "problemKeys", "Display current list of problem keys,", cliFunc_problemKeys },
|
||||
{ "senseDebug", "Prints out the current sense table N times." NL "\t\tsense:max sense:delta", cliFunc_senseDebug },
|
||||
CLIDict_Entry( echo, "Example command, echos the arguments." );
|
||||
CLIDict_Entry( avgDebug, "Enables/Disables averaging results." NL "\t\tDisplays each average, starting from Key 0x00, ignoring 0 valued averages." );
|
||||
CLIDict_Entry( keyDebug, "Enables/Disables long debug for each keypress." NL "\t\tkeycode - [strobe:mux] : sense val : threshold+delta=total : margin" );
|
||||
CLIDict_Entry( pressDebug, "Enables/Disables short debug for each keypress." );
|
||||
CLIDict_Entry( problemKeys, "Display current list of problem keys," );
|
||||
CLIDict_Entry( senseDebug, "Prints out the current sense table N times." NL "\t\tsense:max sense:delta" );
|
||||
|
||||
CLIDict_Def( scanCLIDict, "DPH Module Commands" ) = {
|
||||
CLIDict_Item( echo ),
|
||||
CLIDict_Item( avgDebug ),
|
||||
CLIDict_Item( keyDebug ),
|
||||
CLIDict_Item( pressDebug ),
|
||||
CLIDict_Item( problemKeys ),
|
||||
CLIDict_Item( senseDebug ),
|
||||
{ 0, 0, 0 } // Null entry for dictionary end
|
||||
};
|
||||
|
||||
|
||||
// CLI Control Variables
|
||||
uint8_t enableAvgDebug = 0;
|
||||
uint8_t enableKeyDebug = 0;
|
||||
|
|
|
@ -46,9 +46,10 @@ void cliFunc_echo( char* args );
|
|||
// ----- Variables -----
|
||||
|
||||
// Scan Module command dictionary
|
||||
const char scanCLIDictName[] = "Scan Module Commands";
|
||||
const CLIDictItem scanCLIDict[] = {
|
||||
{ "echo", "Example command, echos the arguments.", cliFunc_echo },
|
||||
CLIDict_Entry( echo, "Example command, echos the arguments." );
|
||||
|
||||
CLIDict_Def( scanCLIDict, "Scan Module Commands" ) = {
|
||||
CLIDict_Item( echo ),
|
||||
{ 0, 0, 0 } // Null entry for dictionary end
|
||||
};
|
||||
|
||||
|
|
|
@ -49,10 +49,12 @@ void cliFunc_matrixState( char* args );
|
|||
// ----- Variables -----
|
||||
|
||||
// Scan Module command dictionary
|
||||
const char matrixCLIDictName[] = "Matrix Module Commands";
|
||||
const CLIDictItem matrixCLIDict[] = {
|
||||
{ "matrixDebug", "Enables matrix debug mode, prints out each scan code." NL "\t\tIf argument \033[35mT\033[0m is given, prints out each scan code state transition.", cliFunc_matrixDebug },
|
||||
{ "matrixState", "Prints out the current scan table N times." NL "\t\t \033[1mO\033[0m - Off, \033[1;33mP\033[0m - Press, \033[1;32mH\033[0m - Hold, \033[1;35mR\033[0m - Release, \033[1;31mI\033[0m - Invalid", cliFunc_matrixState },
|
||||
CLIDict_Entry( matrixDebug, "Enables matrix debug mode, prints out each scan code." NL "\t\tIf argument \033[35mT\033[0m is given, prints out each scan code state transition." );
|
||||
CLIDict_Entry( matrixState, "Prints out the current scan table N times." NL "\t\t \033[1mO\033[0m - Off, \033[1;33mP\033[0m - Press, \033[1;32mH\033[0m - Hold, \033[1;35mR\033[0m - Release, \033[1;31mI\033[0m - Invalid" );
|
||||
|
||||
CLIDict_Def( matrixCLIDict, "Matrix Module Commands" ) = {
|
||||
CLIDict_Item( matrixDebug ),
|
||||
CLIDict_Item( matrixState ),
|
||||
{ 0, 0, 0 } // Null entry for dictionary end
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue