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
				
			
		| 
						 | 
				
			
			@ -71,13 +71,18 @@ void cliFunc_setMod     ( char* args );
 | 
			
		|||
// ----- Variables -----
 | 
			
		||||
 | 
			
		||||
// Output Module command dictionary
 | 
			
		||||
const char outputCLIDictName[] = "USB Module Commands";
 | 
			
		||||
const CLIDictItem outputCLIDict[] = {
 | 
			
		||||
	{ "kbdProtocol", "Keyboard Protocol Mode: 0 - Boot, 1 - OS/NKRO Mode", cliFunc_kbdProtocol },
 | 
			
		||||
	{ "readLEDs",    "Read LED byte:" NL "\t\t1 NumLck, 2 CapsLck, 4 ScrlLck, 16 Kana, etc.", cliFunc_readLEDs },
 | 
			
		||||
	{ "sendKeys",    "Send the prepared list of USB codes and modifier byte.", cliFunc_sendKeys },
 | 
			
		||||
	{ "setKeys",     "Prepare a space separated list of USB codes (decimal). Waits until \033[35msendKeys\033[0m.", cliFunc_setKeys },
 | 
			
		||||
	{ "setMod",      "Set the modfier byte:" NL "\t\t1 LCtrl, 2 LShft, 4 LAlt, 8 LGUI, 16 RCtrl, 32 RShft, 64 RAlt, 128 RGUI", cliFunc_setMod },
 | 
			
		||||
CLIDict_Entry( kbdProtocol, "Keyboard Protocol Mode: 0 - Boot, 1 - OS/NKRO Mode" );
 | 
			
		||||
CLIDict_Entry( readLEDs,    "Read LED byte:" NL "\t\t1 NumLck, 2 CapsLck, 4 ScrlLck, 16 Kana, etc." );
 | 
			
		||||
CLIDict_Entry( sendKeys,    "Send the prepared list of USB codes and modifier byte." );
 | 
			
		||||
CLIDict_Entry( setKeys,     "Prepare a space separated list of USB codes (decimal). Waits until \033[35msendKeys\033[0m." );
 | 
			
		||||
CLIDict_Entry( setMod,      "Set the modfier byte:" NL "\t\t1 LCtrl, 2 LShft, 4 LAlt, 8 LGUI, 16 RCtrl, 32 RShft, 64 RAlt, 128 RGUI" );
 | 
			
		||||
 | 
			
		||||
CLIDict_Def( outputCLIDict, "USB Module Commands" ) = {
 | 
			
		||||
	CLIDict_Item( kbdProtocol ),
 | 
			
		||||
	CLIDict_Item( readLEDs ),
 | 
			
		||||
	CLIDict_Item( sendKeys ),
 | 
			
		||||
	CLIDict_Item( setKeys ),
 | 
			
		||||
	CLIDict_Item( setMod ),
 | 
			
		||||
	{ 0, 0, 0 } // Null entry for dictionary end
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue