+void cliFunc_avgDebug( char* args )
+{
+ print( NL );
+
+ // Args ignored, just toggling
+ if ( enableAvgDebug )
+ {
+ info_print("Cap Sense averaging debug disabled.");
+ enableAvgDebug = 0;
+ }
+ else
+ {
+ info_print("Cap Sense averaging debug enabled.");
+ enableAvgDebug = 1;
+ }
+}
+
+void cliFunc_keyDebug( char* args )
+{
+ print( NL );
+
+ // Args ignored, just toggling
+ if ( enableKeyDebug )
+ {
+ info_print("Cap Sense key long debug disabled - pre debounce.");
+ enableKeyDebug = 0;
+ }
+ else
+ {
+ info_print("Cap Sense key long debug enabled - pre debounce.");
+ enableKeyDebug = 1;
+ }
+}
+
+void cliFunc_pressDebug( char* args )
+{
+ print( NL );
+
+ // Args ignored, just toggling
+ if ( enablePressDebug )
+ {
+ info_print("Cap Sense key debug disabled - post debounce.");
+ enablePressDebug = 0;
+ }
+ else
+ {
+ info_print("Cap Sense key debug enabled - post debounce.");
+ enablePressDebug = 1;
+ }
+}
+
+void cliFunc_problemKeys( char* args )
+{
+ print( NL );
+
+ uint8_t count = 0;
+
+ // Args ignored, just displaying
+ // Display problem keys, and the sense value at the time
+ for ( uint8_t key = 0; key < KEY_COUNT; key++ )
+ {
+ if ( keys_problem[key] )
+ {
+ if ( count++ == 0 )
+ {
+ warn_msg("Problem keys: ");
+ }
+ printHex( key );
+ print(" (");
+ printHex( keys_problem[key] );
+ print(") " );
+ }
+ }
+}
+
+void cliFunc_senseDebug( char* args )
+{
+ // Parse code from argument
+ // NOTE: Only first argument is used
+ char* arg1Ptr;
+ char* arg2Ptr;
+ CLI_argumentIsolation( args, &arg1Ptr, &arg2Ptr );
+
+ // Default to a single print
+ senseDebugCount = 1;
+
+ // If there was an argument, use that instead
+ if ( *arg1Ptr != '\0' )
+ {
+ senseDebugCount = numToInt( arg1Ptr );
+ }
+}
+