diff options
author | IBNobody <ibnobody@gmail.com> | 2016-04-17 12:54:32 -0500 |
---|---|---|
committer | IBNobody <ibnobody@gmail.com> | 2016-04-17 12:54:32 -0500 |
commit | d5b72e7bde5ede25f7d5699b50b7d9eb6f31ba92 (patch) | |
tree | 906fb97e49f1db6e3ddbbbca07cb3ff930d187d6 /tmk_core/common/command.c | |
parent | c940e87235c9fe26f5c7451464af54a493270a68 (diff) | |
download | qmk_firmware-d5b72e7bde5ede25f7d5699b50b7d9eb6f31ba92.tar.gz qmk_firmware-d5b72e7bde5ede25f7d5699b50b7d9eb6f31ba92.zip |
Fixed many compiler warnings related to print being disabled
Diffstat (limited to 'tmk_core/common/command.c')
-rw-r--r-- | tmk_core/common/command.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index b4cd3ca56..7572b9597 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c | |||
@@ -122,7 +122,7 @@ static void command_common_help(void) | |||
122 | STR(MAGIC_KEY_VERSION ) ": Version\n" | 122 | STR(MAGIC_KEY_VERSION ) ": Version\n" |
123 | STR(MAGIC_KEY_STATUS ) ": Status\n" | 123 | STR(MAGIC_KEY_STATUS ) ": Status\n" |
124 | STR(MAGIC_KEY_CONSOLE ) ": Activate Console Mode\n" | 124 | STR(MAGIC_KEY_CONSOLE ) ": Activate Console Mode\n" |
125 | 125 | ||
126 | #if MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | 126 | #if MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM |
127 | STR(MAGIC_KEY_LAYER0 ) ": Switch to Layer 0\n" | 127 | STR(MAGIC_KEY_LAYER0 ) ": Switch to Layer 0\n" |
128 | STR(MAGIC_KEY_LAYER1 ) ": Switch to Layer 1\n" | 128 | STR(MAGIC_KEY_LAYER1 ) ": Switch to Layer 1\n" |
@@ -136,11 +136,11 @@ static void command_common_help(void) | |||
136 | STR(MAGIC_KEY_LAYER9 ) ": Switch to Layer 9\n" | 136 | STR(MAGIC_KEY_LAYER9 ) ": Switch to Layer 9\n" |
137 | #endif | 137 | #endif |
138 | 138 | ||
139 | #if MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | 139 | #if MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS |
140 | "F1-F10: Switch to Layer 0-9 (F10 = L0)\n" | 140 | "F1-F10: Switch to Layer 0-9 (F10 = L0)\n" |
141 | #endif | 141 | #endif |
142 | 142 | ||
143 | #if MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | 143 | #if MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS |
144 | "0-9: Switch to Layer 0-9\n" | 144 | "0-9: Switch to Layer 0-9\n" |
145 | #endif | 145 | #endif |
146 | 146 | ||
@@ -251,6 +251,7 @@ static void print_status(void) | |||
251 | #ifdef BOOTMAGIC_ENABLE | 251 | #ifdef BOOTMAGIC_ENABLE |
252 | static void print_eeconfig(void) | 252 | static void print_eeconfig(void) |
253 | { | 253 | { |
254 | #ifndef NO_PRINT | ||
254 | print("default_layer: "); print_dec(eeconfig_read_default_layer()); print("\n"); | 255 | print("default_layer: "); print_dec(eeconfig_read_default_layer()); print("\n"); |
255 | 256 | ||
256 | debug_config_t dc; | 257 | debug_config_t dc; |
@@ -279,9 +280,12 @@ static void print_eeconfig(void) | |||
279 | print("backlight_config.raw: "); print_hex8(bc.raw); print("\n"); | 280 | print("backlight_config.raw: "); print_hex8(bc.raw); print("\n"); |
280 | print(".enable: "); print_dec(bc.enable); print("\n"); | 281 | print(".enable: "); print_dec(bc.enable); print("\n"); |
281 | print(".level: "); print_dec(bc.level); print("\n"); | 282 | print(".level: "); print_dec(bc.level); print("\n"); |
282 | #endif | 283 | #endif /* BACKLIGHT_ENABLE */ |
284 | |||
285 | #endif /* !NO_PRINT */ | ||
286 | |||
283 | } | 287 | } |
284 | #endif | 288 | #endif /* BOOTMAGIC_ENABLE */ |
285 | 289 | ||
286 | static bool command_common(uint8_t code) | 290 | static bool command_common(uint8_t code) |
287 | { | 291 | { |
@@ -305,7 +309,7 @@ static bool command_common(uint8_t code) | |||
305 | #ifdef BOOTMAGIC_ENABLE | 309 | #ifdef BOOTMAGIC_ENABLE |
306 | 310 | ||
307 | // print stored eeprom config | 311 | // print stored eeprom config |
308 | case MAGIC_KC(MAGIC_KEY_EEPROM): | 312 | case MAGIC_KC(MAGIC_KEY_EEPROM): |
309 | print("eeconfig:\n"); | 313 | print("eeconfig:\n"); |
310 | print_eeconfig(); | 314 | print_eeconfig(); |
311 | break; | 315 | break; |
@@ -369,7 +373,7 @@ static bool command_common(uint8_t code) | |||
369 | break; | 373 | break; |
370 | 374 | ||
371 | // debug matrix toggle | 375 | // debug matrix toggle |
372 | case MAGIC_KC(MAGIC_KEY_DEBUG_MATRIX): | 376 | case MAGIC_KC(MAGIC_KEY_DEBUG_MATRIX): |
373 | debug_matrix = !debug_matrix; | 377 | debug_matrix = !debug_matrix; |
374 | if (debug_matrix) { | 378 | if (debug_matrix) { |
375 | print("\nmatrix: on\n"); | 379 | print("\nmatrix: on\n"); |
@@ -380,7 +384,7 @@ static bool command_common(uint8_t code) | |||
380 | break; | 384 | break; |
381 | 385 | ||
382 | // debug keyboard toggle | 386 | // debug keyboard toggle |
383 | case MAGIC_KC(MAGIC_KEY_DEBUG_KBD): | 387 | case MAGIC_KC(MAGIC_KEY_DEBUG_KBD): |
384 | debug_keyboard = !debug_keyboard; | 388 | debug_keyboard = !debug_keyboard; |
385 | if (debug_keyboard) { | 389 | if (debug_keyboard) { |
386 | print("\nkeyboard: on\n"); | 390 | print("\nkeyboard: on\n"); |
@@ -551,6 +555,7 @@ static uint8_t mousekey_param = 0; | |||
551 | 555 | ||
552 | static void mousekey_param_print(void) | 556 | static void mousekey_param_print(void) |
553 | { | 557 | { |
558 | #ifndef NO_PRINT | ||
554 | print("\n\t- Values -\n"); | 559 | print("\n\t- Values -\n"); |
555 | print("1: delay(*10ms): "); pdec(mk_delay); print("\n"); | 560 | print("1: delay(*10ms): "); pdec(mk_delay); print("\n"); |
556 | print("2: interval(ms): "); pdec(mk_interval); print("\n"); | 561 | print("2: interval(ms): "); pdec(mk_interval); print("\n"); |
@@ -558,6 +563,8 @@ static void mousekey_param_print(void) | |||
558 | print("4: time_to_max: "); pdec(mk_time_to_max); print("\n"); | 563 | print("4: time_to_max: "); pdec(mk_time_to_max); print("\n"); |
559 | print("5: wheel_max_speed: "); pdec(mk_wheel_max_speed); print("\n"); | 564 | print("5: wheel_max_speed: "); pdec(mk_wheel_max_speed); print("\n"); |
560 | print("6: wheel_time_to_max: "); pdec(mk_wheel_time_to_max); print("\n"); | 565 | print("6: wheel_time_to_max: "); pdec(mk_wheel_time_to_max); print("\n"); |
566 | #endif /* !NO_PRINT */ | ||
567 | |||
561 | } | 568 | } |
562 | 569 | ||
563 | //#define PRINT_SET_VAL(v) print(#v " = "); print_dec(v); print("\n"); | 570 | //#define PRINT_SET_VAL(v) print(#v " = "); print_dec(v); print("\n"); |
@@ -677,7 +684,7 @@ static void mousekey_console_help(void) | |||
677 | "pgdown: -10\n" | 684 | "pgdown: -10\n" |
678 | "\n" | 685 | "\n" |
679 | "speed = delta * max_speed * (repeat / time_to_max)\n"); | 686 | "speed = delta * max_speed * (repeat / time_to_max)\n"); |
680 | xprintf("where delta: cursor=%d, wheel=%d\n" | 687 | xprintf("where delta: cursor=%d, wheel=%d\n" |
681 | "See http://en.wikipedia.org/wiki/Mouse_keys\n", MOUSEKEY_MOVE_DELTA, MOUSEKEY_WHEEL_DELTA); | 688 | "See http://en.wikipedia.org/wiki/Mouse_keys\n", MOUSEKEY_MOVE_DELTA, MOUSEKEY_WHEEL_DELTA); |
682 | } | 689 | } |
683 | 690 | ||