diff --git a/Debug/debugconsole/setup.cmake b/Debug/debugconsole/setup.cmake new file mode 100644 index 000000000..ba68ca75d --- /dev/null +++ b/Debug/debugconsole/setup.cmake @@ -0,0 +1,28 @@ +###| CMake Kiibohd Controller Debug Module |### +# +# Written by Jacob Alexander in 2011-2015 for the Kiibohd Controller +# +# Released into the Public Domain +# +### + + +### +# Required Submodules +# + +AddModule ( Debug cli ) +AddModule ( Debug led ) +AddModule ( Debug print ) + +add_definitions(-DDEBUG) + + +### +# Compiler Family Compatibility +# +set ( ModuleCompatibility + arm + avr +) + diff --git a/main.c b/main.c index 3b48941df..a44e050e5 100644 --- a/main.c +++ b/main.c @@ -45,8 +45,10 @@ int main() CLKPR = 0x00; #endif +#if defined(DEBUG) // Enable CLI CLI_init(); +#endif // Setup Modules Output_setup(); @@ -56,8 +58,10 @@ int main() // Main Detection Loop while ( 1 ) { +#if defined(DEBUG) // Process CLI CLI_process(); +#endif // Acquire Key Indices // Loop continuously until scan_loop returns 0