diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-04-13 14:07:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-13 14:07:48 -0400 |
commit | 41a46c7c8e4aa2470c245cbe09deb57c0720698e (patch) | |
tree | 8b07323439fc477f47833d7ee7564e26b323a3eb | |
parent | d3301c0f8b0005738ab9aa2030d83739ffb5c4b6 (diff) | |
parent | d68294615f9c67764c06a7524fb59c22c024a106 (diff) | |
download | qmk_firmware-41a46c7c8e4aa2470c245cbe09deb57c0720698e.tar.gz qmk_firmware-41a46c7c8e4aa2470c245cbe09deb57c0720698e.zip |
Merge pull request #1224 from fredizzimo/fix_warnings
Fix all warnings and turn on warnings as errors
40 files changed, 112 insertions, 70 deletions
@@ -21,6 +21,8 @@ override SILENT := false | |||
21 | 21 | ||
22 | ON_ERROR := error_occurred=1 | 22 | ON_ERROR := error_occurred=1 |
23 | 23 | ||
24 | BREAK_ON_ERRORS = no | ||
25 | |||
24 | STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) | 26 | STARTING_MAKEFILE := $(firstword $(MAKEFILE_LIST)) |
25 | ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) | 27 | ROOT_MAKEFILE := $(lastword $(MAKEFILE_LIST)) |
26 | ROOT_DIR := $(dir $(ROOT_MAKEFILE)) | 28 | ROOT_DIR := $(dir $(ROOT_MAKEFILE)) |
@@ -462,20 +464,25 @@ endef | |||
462 | 464 | ||
463 | include $(ROOT_DIR)/message.mk | 465 | include $(ROOT_DIR)/message.mk |
464 | 466 | ||
467 | ifeq ($(strip $(BREAK_ON_ERRORS)), yes) | ||
468 | HANDLE_ERROR = exit 1 | ||
469 | else | ||
470 | HANDLE_ERROR = echo $$error_occurred > $(ERROR_FILE) | ||
471 | endif | ||
472 | |||
465 | # The empty line is important here, as it will force a new shell to be created for each command | 473 | # The empty line is important here, as it will force a new shell to be created for each command |
466 | # Otherwise the command line will become too long with a lot of keyboards and keymaps | 474 | # Otherwise the command line will become too long with a lot of keyboards and keymaps |
467 | define RUN_COMMAND | 475 | define RUN_COMMAND |
468 | +error_occurred=0;\ | 476 | +error_occurred=0;\ |
469 | $(COMMAND_$(SILENT_MODE)_$(COMMAND))\ | 477 | $(COMMAND_$(SILENT_MODE)_$(COMMAND))\ |
470 | if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; | 478 | if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi; |
471 | 479 | ||
472 | 480 | ||
473 | endef | 481 | endef |
474 | define RUN_TEST | 482 | define RUN_TEST |
475 | +error_occurred=0;\ | 483 | +error_occurred=0;\ |
476 | $($(TEST)_COMMAND)\ | 484 | $($(TEST)_COMMAND)\ |
477 | if [ $$error_occurred -gt 0 ]; then echo $$error_occurred > $(ERROR_FILE); fi; | 485 | if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi; |
478 | |||
479 | endef | 486 | endef |
480 | 487 | ||
481 | # Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps | 488 | # Allow specifying just the subproject, in the keyboard directory, which will compile all keymaps |
@@ -527,14 +534,22 @@ test: test-all | |||
527 | .PHONY: test-clean | 534 | .PHONY: test-clean |
528 | test-clean: test-all-clean | 535 | test-clean: test-all-clean |
529 | 536 | ||
537 | ifdef SKIP_VERSION | ||
538 | SKIP_GIT := yes | ||
539 | endif | ||
540 | |||
530 | # Generate the version.h file | 541 | # Generate the version.h file |
531 | ifndef SKIP_GIT | 542 | ifndef SKIP_GIT |
532 | GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") | 543 | GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") |
533 | else | 544 | else |
534 | GIT_VERSION := NA | 545 | GIT_VERSION := NA |
535 | endif | 546 | endif |
547 | ifndef SKIP_VERSION | ||
536 | BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") | 548 | BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") |
537 | $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) | 549 | $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) |
538 | $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) | 550 | $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) |
551 | else | ||
552 | BUILD_DATE := NA | ||
553 | endif | ||
539 | 554 | ||
540 | include $(ROOT_DIR)/testlist.mk | 555 | include $(ROOT_DIR)/testlist.mk |
diff --git a/build_keyboard.mk b/build_keyboard.mk index 9da8277db..9fa8c3126 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk | |||
@@ -176,22 +176,26 @@ endif | |||
176 | 176 | ||
177 | ifeq ($(strip $(UCIS_ENABLE)), yes) | 177 | ifeq ($(strip $(UCIS_ENABLE)), yes) |
178 | OPT_DEFS += -DUCIS_ENABLE | 178 | OPT_DEFS += -DUCIS_ENABLE |
179 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c | 179 | UNICODE_COMMON = yes |
180 | SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c | 180 | SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c |
181 | endif | 181 | endif |
182 | 182 | ||
183 | ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) | 183 | ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) |
184 | OPT_DEFS += -DUNICODEMAP_ENABLE | 184 | OPT_DEFS += -DUNICODEMAP_ENABLE |
185 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c | 185 | UNICODE_COMMON = yes |
186 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c | 186 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c |
187 | endif | 187 | endif |
188 | 188 | ||
189 | ifeq ($(strip $(UNICODE_ENABLE)), yes) | 189 | ifeq ($(strip $(UNICODE_ENABLE)), yes) |
190 | OPT_DEFS += -DUNICODE_ENABLE | 190 | OPT_DEFS += -DUNICODE_ENABLE |
191 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c | 191 | UNICODE_COMMON = yes |
192 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c | 192 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c |
193 | endif | 193 | endif |
194 | 194 | ||
195 | ifeq ($(strip $(UNICODE_COMMON)), yes) | ||
196 | SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c | ||
197 | endif | ||
198 | |||
195 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) | 199 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) |
196 | OPT_DEFS += -DRGBLIGHT_ENABLE | 200 | OPT_DEFS += -DRGBLIGHT_ENABLE |
197 | SRC += $(QUANTUM_DIR)/light_ws2812.c | 201 | SRC += $(QUANTUM_DIR)/light_ws2812.c |
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index ae4fd444d..d299d02c3 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | |||
@@ -311,12 +311,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
311 | break; | 311 | break; |
312 | case SWITCH_NDS: | 312 | case SWITCH_NDS: |
313 | if (record->event.pressed) { | 313 | if (record->event.pressed) { |
314 | return MACRO( D(LSFT), T(F11), U(LSFT), W(500), D(LALT), T(TAB), U(LALT), END); | 314 | return MACRO( D(LSFT), T(F11), U(LSFT), W(255), D(LALT), T(TAB), U(LALT), END); |
315 | } | 315 | } |
316 | break; | 316 | break; |
317 | case OPEN_CLOSE_PAREN: | 317 | case OPEN_CLOSE_PAREN: |
318 | if (record->event.pressed) { | 318 | if (record->event.pressed) { |
319 | return MACRO( D(LSFT), T(LPRN), T(RPRN), U(LSFT), T(LEFT), END); | 319 | return MACRO( D(LSFT), T(9), T(0), U(LSFT), T(LEFT), END); |
320 | } | 320 | } |
321 | break; | 321 | break; |
322 | case OPEN_CLOSE_BRACKET: | 322 | case OPEN_CLOSE_BRACKET: |
@@ -326,7 +326,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
326 | break; | 326 | break; |
327 | case OPEN_CLOSE_CURLY: | 327 | case OPEN_CLOSE_CURLY: |
328 | if (record->event.pressed) { | 328 | if (record->event.pressed) { |
329 | return MACRO( D(LSFT), T(LCBR), T(RCBR), U(LSFT), T(LEFT), END); | 329 | return MACRO( D(LSFT), T(LBRC), T(RBRC), U(LSFT), T(LEFT), END); |
330 | } | 330 | } |
331 | break; | 331 | break; |
332 | case OPEN_CLOSE_SINGLE_QUOTE: | 332 | case OPEN_CLOSE_SINGLE_QUOTE: |
diff --git a/keyboards/ergodox/keymaps/ordinary/keymap.c b/keyboards/ergodox/keymaps/ordinary/keymap.c index 1dfdf7e62..ac84df570 100644 --- a/keyboards/ergodox/keymaps/ordinary/keymap.c +++ b/keyboards/ergodox/keymaps/ordinary/keymap.c | |||
@@ -392,7 +392,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
392 | 392 | ||
393 | case NotEq: | 393 | case NotEq: |
394 | if (record->event.pressed) { | 394 | if (record->event.pressed) { |
395 | return MACRO( I(10), D(LSFT), T(EXLM), U(LSFT), T(EQL), END ); // != | 395 | return MACRO( I(10), D(LSFT), T(1), U(LSFT), T(EQL), END ); // != |
396 | } | 396 | } |
397 | break; | 397 | break; |
398 | 398 | ||
diff --git a/keyboards/ergodox/keymaps/yoruian/keymap.c b/keyboards/ergodox/keymaps/yoruian/keymap.c index d3635ddf3..41dfda3c6 100644 --- a/keyboards/ergodox/keymaps/yoruian/keymap.c +++ b/keyboards/ergodox/keymaps/yoruian/keymap.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include "yoruian.h" | 17 | #include "yoruian.h" |
18 | 18 | ||
19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
20 | [0] = KEYMAP\ | 20 | [0] = KEYMAP_YORUIAN\ |
21 | (9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8, | 21 | (9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8, |
22 | ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q, | 22 | ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q, |
23 | LC, U, I, A, N, SCLN, M, H, T, S, C, RC, | 23 | LC, U, I, A, N, SCLN, M, H, T, S, C, RC, |
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
26 | BSPC, RALT, P2, TAB, | 26 | BSPC, RALT, P2, TAB, |
27 | NO, NO, | 27 | NO, NO, |
28 | E, LSFT, NO, NO, ENT, SPC), | 28 | E, LSFT, NO, NO, ENT, SPC), |
29 | [1] = KEYMAP\ | 29 | [1] = KEYMAP_YORUIAN\ |
30 | (TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9, | 30 | (TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9, |
31 | TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT, | 31 | TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT, |
32 | TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE, | 32 | TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE, |
diff --git a/keyboards/ergodox/keymaps/yoruian/yoruian.h b/keyboards/ergodox/keymaps/yoruian/yoruian.h index 1adcb7fd3..b3b13073c 100644 --- a/keyboards/ergodox/keymaps/yoruian/yoruian.h +++ b/keyboards/ergodox/keymaps/yoruian/yoruian.h | |||
@@ -18,9 +18,7 @@ | |||
18 | #include "debug.h" | 18 | #include "debug.h" |
19 | #include "action_layer.h" | 19 | #include "action_layer.h" |
20 | 20 | ||
21 | #undef KEYMAP | 21 | #define KEYMAP_YORUIAN( \ |
22 | #define KEYMAP\ | ||
23 | ( \ | ||
24 | /* Spacial positions. */ \ | 22 | /* Spacial positions. */ \ |
25 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ | 23 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ |
26 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ | 24 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ |
@@ -30,24 +28,15 @@ | |||
30 | k55, k56, k57, k58, \ | 28 | k55, k56, k57, k58, \ |
31 | k54, k59, \ | 29 | k54, k59, \ |
32 | k53, k52, k51, k5C, k5B, k5A) \ | 30 | k53, k52, k51, k5C, k5B, k5A) \ |
33 | \ | 31 | KEYMAP( \ |
34 | /* Matrix positions. */ \ | 32 | KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0A, KC_##k0B, KC_##k0C, KC_##k0D, \ |
35 | { \ | 33 | KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1A, KC_##k1B, KC_##k1C, KC_##k1D, \ |
36 | { KC_##k00, KC_##k10, KC_##k20, KC_##k30, KC_##k40, KC_NO }, \ | 34 | KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k28, KC_##k29, KC_##k2A, KC_##k2B, KC_##k2C, KC_##k2D, \ |
37 | { KC_##k01, KC_##k11, KC_##k21, KC_##k31, KC_##k41, KC_##k51 }, \ | 35 | KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3A, KC_##k3B, KC_##k3C, KC_##k3D, \ |
38 | { KC_##k02, KC_##k12, KC_##k22, KC_##k32, KC_##k42, KC_##k52 }, \ | 36 | KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k49, KC_##k4A, KC_##k4B, KC_##k4C, KC_##k4D, \ |
39 | { KC_##k03, KC_##k13, KC_##k23, KC_##k33, KC_##k43, KC_##k53 }, \ | 37 | KC_##k55, KC_##k56, KC_##k57, KC_##k58, \ |
40 | { KC_##k04, KC_##k14, KC_##k24, KC_##k34, KC_##k44, KC_##k54 }, \ | 38 | KC_##k54, KC_##k59, \ |
41 | { KC_##k05, KC_##k15, KC_##k25, KC_##k35, KC_NO, KC_##k55 }, \ | 39 | KC_##k53, KC_##k52, KC_##k51, KC_##k5C, KC_##k5B, KC_##k5A) |
42 | { KC_##k06, KC_##k16, KC_NO, KC_##k36, KC_NO, KC_##k56 }, \ | ||
43 | { KC_##k07, KC_##k17, KC_NO, KC_##k37, KC_NO, KC_##k57 }, \ | ||
44 | { KC_##k08, KC_##k18, KC_##k28, KC_##k38, KC_NO, KC_##k58 }, \ | ||
45 | { KC_##k09, KC_##k19, KC_##k29, KC_##k39, KC_##k49, KC_##k59 }, \ | ||
46 | { KC_##k0A, KC_##k1A, KC_##k2A, KC_##k3A, KC_##k4A, KC_##k5A }, \ | ||
47 | { KC_##k0B, KC_##k1B, KC_##k2B, KC_##k3B, KC_##k4B, KC_##k5B }, \ | ||
48 | { KC_##k0C, KC_##k1C, KC_##k2C, KC_##k3C, KC_##k4C, KC_##k5C }, \ | ||
49 | { KC_##k0D, KC_##k1D, KC_##k2D, KC_##k3D, KC_##k4D, KC_NO } \ | ||
50 | } | ||
51 | 40 | ||
52 | #define KC_ES KC_ESC | 41 | #define KC_ES KC_ESC |
53 | #define KC_LC KC_LCTL | 42 | #define KC_LC KC_LCTL |
diff --git a/keyboards/frosty_flake/matrix.c b/keyboards/frosty_flake/matrix.c index 05dffdb64..cde7f63b9 100644 --- a/keyboards/frosty_flake/matrix.c +++ b/keyboards/frosty_flake/matrix.c | |||
@@ -115,6 +115,7 @@ inline matrix_row_t matrix_get_row(uint8_t row) { | |||
115 | } | 115 | } |
116 | 116 | ||
117 | void matrix_print(void) { | 117 | void matrix_print(void) { |
118 | #ifndef NO_PRINT | ||
118 | print("\nr\\c ABCDEFGHIJKLMNOPQR\n"); | 119 | print("\nr\\c ABCDEFGHIJKLMNOPQR\n"); |
119 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | 120 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { |
120 | matrix_row_t matrix_row = matrix_get_row(row); | 121 | matrix_row_t matrix_row = matrix_get_row(row); |
@@ -125,6 +126,7 @@ void matrix_print(void) { | |||
125 | } | 126 | } |
126 | print("\n"); | 127 | print("\n"); |
127 | } | 128 | } |
129 | #endif | ||
128 | } | 130 | } |
129 | 131 | ||
130 | uint8_t matrix_key_count(void) { | 132 | uint8_t matrix_key_count(void) { |
@@ -132,4 +134,4 @@ uint8_t matrix_key_count(void) { | |||
132 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) | 134 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) |
133 | count += bitpop32(matrix[row]); | 135 | count += bitpop32(matrix[row]); |
134 | return count; | 136 | return count; |
135 | } \ No newline at end of file | 137 | } |
diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c b/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c deleted file mode 100644 index 4c735a6c2..000000000 --- a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include "MS-sculpt-mobile.h" | ||
diff --git a/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c new file mode 100644 index 000000000..64982fb62 --- /dev/null +++ b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.c | |||
@@ -0,0 +1 @@ | |||
#include "MS_sculpt_mobile.h" | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h index 1583dea6e..1583dea6e 100644 --- a/keyboards/handwired/MS-sculpt-mobile/MS-sculpt-mobile.h +++ b/keyboards/handwired/MS_sculpt_mobile/MS_sculpt_mobile.h | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/Makefile b/keyboards/handwired/MS_sculpt_mobile/Makefile index bd09e5885..bd09e5885 100644 --- a/keyboards/handwired/MS-sculpt-mobile/Makefile +++ b/keyboards/handwired/MS_sculpt_mobile/Makefile | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c b/keyboards/handwired/MS_sculpt_mobile/babblePaste.c index 3a9b86997..22394cc7d 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.c +++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.c | |||
@@ -7,7 +7,8 @@ Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts | |||
7 | and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c | 7 | and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "babblePaste.h" | 10 | #include "../MS_sculpt_mobile/babblePaste.h" |
11 | |||
11 | #include "action_macro.h" | 12 | #include "action_macro.h" |
12 | 13 | ||
13 | #ifdef USE_BABLPASTE | 14 | #ifdef USE_BABLPASTE |
@@ -27,7 +28,7 @@ macro_t* switch_babble_mode( uint8_t id) { | |||
27 | // And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15 | 28 | // And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15 |
28 | #define BABLM(ent, macro...) \ | 29 | #define BABLM(ent, macro...) \ |
29 | if ( ent == shortcut ) \ | 30 | if ( ent == shortcut ) \ |
30 | { action_macro_play( MACRO(macro)); return MACRO_NONE; } | 31 | { action_macro_play( MACRO(macro)); return MACRO_NONE; } |
31 | 32 | ||
32 | 33 | ||
33 | /* this function runs the appropriate babblepaste macro, given | 34 | /* this function runs the appropriate babblepaste macro, given |
@@ -456,4 +457,4 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) { | |||
456 | } | 457 | } |
457 | 458 | ||
458 | 459 | ||
459 | #endif \ No newline at end of file | 460 | #endif |
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h b/keyboards/handwired/MS_sculpt_mobile/babblePaste.h index 3067c854d..cedd7d92b 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.h +++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.h | |||
@@ -9,9 +9,9 @@ and jeebak & algernon's keymap | |||
9 | */ | 9 | */ |
10 | #ifndef _babblePaste_h_included__ | 10 | #ifndef _babblePaste_h_included__ |
11 | #define _babblePaste_h_included__ | 11 | #define _babblePaste_h_included__ |
12 | #include "../MS_sculpt_mobile/config.h" | ||
12 | #include "action_layer.h" | 13 | #include "action_layer.h" |
13 | #include "quantum_keycodes.h" | 14 | #include "quantum_keycodes.h" |
14 | #include "config.h" | ||
15 | 15 | ||
16 | #ifdef USE_BABLPASTE | 16 | #ifdef USE_BABLPASTE |
17 | 17 | ||
diff --git a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt b/keyboards/handwired/MS_sculpt_mobile/babblePaste.txt index cf75e153e..cf75e153e 100644 --- a/keyboards/handwired/MS-sculpt-mobile/babblePaste.txt +++ b/keyboards/handwired/MS_sculpt_mobile/babblePaste.txt | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/config.h b/keyboards/handwired/MS_sculpt_mobile/config.h index f89514278..f89514278 100644 --- a/keyboards/handwired/MS-sculpt-mobile/config.h +++ b/keyboards/handwired/MS_sculpt_mobile/config.h | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile index 8b829218b..8b829218b 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/Makefile +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/Makefile | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h index 8893d122e..4f3a425b7 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/config.h +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/config.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | #ifndef CONFIG_USER_H |
2 | #define CONFIG_USER_H | 2 | #define CONFIG_USER_H |
3 | 3 | ||
4 | #include "../../config.h" | 4 | #include "../../../MS_sculpt_mobile/config.h" |
5 | 5 | ||
6 | // place overrides here | 6 | // place overrides here |
7 | 7 | ||
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c index ab09dcdd1..a8802c99a 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/keymap.c +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/keymap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | #include "MS-sculpt-mobile.h" | 1 | #include "../../MS_sculpt_mobile.h" |
2 | 2 | ||
3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
4 | /* | 4 | /* |
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md index e67ddc6fe..e67ddc6fe 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/default/readme.md +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/default/readme.md | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile index 1209ad781..1209ad781 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/Makefile +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/Makefile | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h index 8cf4202cd..5c04f647c 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/config.h +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/config.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef CONFIG_USER_H | 1 | #ifndef CONFIG_USER_H |
2 | #define CONFIG_USER_H | 2 | #define CONFIG_USER_H |
3 | 3 | ||
4 | #include "../../config.h" | 4 | #include "../../../MS_sculpt_mobile/config.h" |
5 | 5 | ||
6 | #define USE_BABLPASTE | 6 | #define USE_BABLPASTE |
7 | 7 | ||
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c index 395a9fb47..c9a8ccdb6 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/keymap.c | |||
@@ -1,7 +1,7 @@ | |||
1 | #include "MS-sculpt-mobile.h" | 1 | #include "../../../MS_sculpt_mobile/babblePaste.h" |
2 | #include "../../MS_sculpt_mobile.h" | ||
2 | #include "action_layer.h" | 3 | #include "action_layer.h" |
3 | #include "action_util.h" | 4 | #include "action_util.h" |
4 | #include "babblePaste.h" | ||
5 | 5 | ||
6 | #ifdef AUDIO_ENABLE | 6 | #ifdef AUDIO_ENABLE |
7 | #include "audio.h" | 7 | #include "audio.h" |
diff --git a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md index 96ee0e77a..96ee0e77a 100644 --- a/keyboards/handwired/MS-sculpt-mobile/keymaps/milestogo/readme.md +++ b/keyboards/handwired/MS_sculpt_mobile/keymaps/milestogo/readme.md | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/readme.md b/keyboards/handwired/MS_sculpt_mobile/readme.md index d435b449f..d435b449f 100644 --- a/keyboards/handwired/MS-sculpt-mobile/readme.md +++ b/keyboards/handwired/MS_sculpt_mobile/readme.md | |||
diff --git a/keyboards/handwired/MS-sculpt-mobile/rules.mk b/keyboards/handwired/MS_sculpt_mobile/rules.mk index 680389c84..680389c84 100644 --- a/keyboards/handwired/MS-sculpt-mobile/rules.mk +++ b/keyboards/handwired/MS_sculpt_mobile/rules.mk | |||
diff --git a/keyboards/kitten_paw/keymaps/ickerwx/config.h b/keyboards/kitten_paw/keymaps/ickerwx/config.h index 04a2d253c..142aba890 100644 --- a/keyboards/kitten_paw/keymaps/ickerwx/config.h +++ b/keyboards/kitten_paw/keymaps/ickerwx/config.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #undef MOUSEKEY_WHEEL_MAX_SPEED | 22 | #undef MOUSEKEY_WHEEL_MAX_SPEED |
23 | #define MOUSEKEY_WHEEL_MAX_SPEED 3 | 23 | #define MOUSEKEY_WHEEL_MAX_SPEED 3 |
24 | #undef MOUSEKEY_WHEEL_TIME_TO_MAX | 24 | #undef MOUSEKEY_WHEEL_TIME_TO_MAX |
25 | #define MOUSEKEY_WHEEL_TIME_TO_MAX 1000 | 25 | #define MOUSEKEY_WHEEL_TIME_TO_MAX 255 |
26 | #undef ONESHOT_TIMEOUT | 26 | #undef ONESHOT_TIMEOUT |
27 | #define ONESHOT_TIMEOUT 500 | 27 | #define ONESHOT_TIMEOUT 500 |
28 | #undef TAPPING_TOGGLE | 28 | #undef TAPPING_TOGGLE |
diff --git a/keyboards/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/kitten_paw/keymaps/ickerwx/keymap.c index 9a00c80dc..9dffbb272 100644 --- a/keyboards/kitten_paw/keymaps/ickerwx/keymap.c +++ b/keyboards/kitten_paw/keymaps/ickerwx/keymap.c | |||
@@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
64 | _______,S(NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(NUBS),S(MINS), _______, _______, _______,_______,_______,_______, \ | 64 | _______,S(NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(NUBS),S(MINS), _______, _______, _______,_______,_______,_______, \ |
65 | _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______, _______,_______), | 65 | _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______, _______,_______), |
66 | /* Layer 3: media layer */ | 66 | /* Layer 3: media layer */ |
67 | [MEDIA] = KEYMAP(\ | 67 | [MEDIA] = KEYMAP(\ |
68 | KC_PWR,KC_SLEP,KC_WAKE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX, \ | 68 | KC_PWR,KC_SLEP,KC_WAKE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX, \ |
69 | XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_MPRV,KC_MPLY,KC_MNXT, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \ | 69 | XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_MPRV,KC_MPLY,KC_MNXT, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \ |
70 | XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_VOLD,KC_MUTE,KC_VOLU, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \ | 70 | XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, KC_VOLD,KC_MUTE,KC_VOLU, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, \ |
diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c index 2208780b1..491cd1d07 100644 --- a/keyboards/planck/keymaps/lucas/keymap.c +++ b/keyboards/planck/keymaps/lucas/keymap.c | |||
@@ -153,12 +153,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
153 | case 1: // M(1) | 153 | case 1: // M(1) |
154 | if (record->event.pressed) { | 154 | if (record->event.pressed) { |
155 | unregister_code(KC_LSFT); | 155 | unregister_code(KC_LSFT); |
156 | register_code(DE_MORE); | 156 | register_code(DE_LESS); |
157 | } else { | 157 | } else { |
158 | unregister_code(DE_MORE); | 158 | unregister_code(DE_LESS); |
159 | } | 159 | } |
160 | break; | 160 | break; |
161 | } | 161 | } |
162 | return MACRO_NONE; | 162 | return MACRO_NONE; |
163 | 163 | ||
164 | }; \ No newline at end of file | 164 | }; |
diff --git a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c index 5d217e261..a500a3649 100644 --- a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c +++ b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c | |||
@@ -212,10 +212,10 @@ const uint16_t PROGMEM fn_actions[] = { | |||
212 | 212 | ||
213 | #ifdef AUDIO_ENABLE | 213 | #ifdef AUDIO_ENABLE |
214 | float start_up[][2] = { | 214 | float start_up[][2] = { |
215 | {440.0*pow(2.0,(14)/12.0), 20}, | 215 | MUSICAL_NOTE(_B5, 20), |
216 | {440.0*pow(2.0,(26)/12.0), 8}, | 216 | MUSICAL_NOTE(_B6, 8), |
217 | {440.0*pow(2.0,(18)/12.0), 20}, | 217 | MUSICAL_NOTE(_DS6, 20), |
218 | {440.0*pow(2.0,(26)/12.0), 8} | 218 | MUSICAL_NOTE(_B6, 8), |
219 | }; | 219 | }; |
220 | 220 | ||
221 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); | 221 | float tone_qwerty[][2] = SONG(QWERTY_SOUND); |
@@ -323,7 +323,7 @@ void matrix_init_user(void) { | |||
323 | 323 | ||
324 | #ifdef AUDIO_ENABLE | 324 | #ifdef AUDIO_ENABLE |
325 | 325 | ||
326 | void play_goodbye_tone() | 326 | void play_goodbye_tone(void) |
327 | { | 327 | { |
328 | PLAY_NOTE_ARRAY(goodbye, false, 0); | 328 | PLAY_NOTE_ARRAY(goodbye, false, 0); |
329 | _delay_ms(150); | 329 | _delay_ms(150); |
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 6cf4f031f..9dafc8b51 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c | |||
@@ -179,5 +179,12 @@ uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) | |||
179 | __attribute__ ((weak)) | 179 | __attribute__ ((weak)) |
180 | uint16_t keymap_function_id_to_action( uint16_t function_id ) | 180 | uint16_t keymap_function_id_to_action( uint16_t function_id ) |
181 | { | 181 | { |
182 | // The compiler sees the empty (weak) fn_actions and generates a warning | ||
183 | // This function should not be called in that case, so the warning is too strict | ||
184 | // If this function is called however, the keymap should have overridden fn_actions, and then the compile | ||
185 | // is comparing against the wrong array | ||
186 | #pragma GCC diagnostic push | ||
187 | #pragma GCC diagnostic ignored "-Warray-bounds" | ||
182 | return pgm_read_word(&fn_actions[function_id]); | 188 | return pgm_read_word(&fn_actions[function_id]); |
189 | #pragma GCC diagnostic pop | ||
183 | } | 190 | } |
diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h index 8332e00af..67350d660 100644 --- a/quantum/keymap_extras/keymap_german_ch.h +++ b/quantum/keymap_extras/keymap_german_ch.h | |||
@@ -33,6 +33,10 @@ | |||
33 | #define CH_E KC_E | 33 | #define CH_E KC_E |
34 | #define CH_F KC_F | 34 | #define CH_F KC_F |
35 | #define CH_G KC_G | 35 | #define CH_G KC_G |
36 | #ifdef CH_H | ||
37 | // The ChibiOS ch.h file defines this... | ||
38 | #undef CH_H | ||
39 | #endif | ||
36 | #define CH_H KC_H | 40 | #define CH_H KC_H |
37 | #define CH_I KC_I | 41 | #define CH_I KC_I |
38 | #define CH_J KC_J | 42 | #define CH_J KC_J |
diff --git a/quantum/process_keycode/process_printer.c b/quantum/process_keycode/process_printer.c index 807f7a0b9..613af7018 100644 --- a/quantum/process_keycode/process_printer.c +++ b/quantum/process_keycode/process_printer.c | |||
@@ -20,12 +20,12 @@ | |||
20 | bool printing_enabled = false; | 20 | bool printing_enabled = false; |
21 | uint8_t character_shift = 0; | 21 | uint8_t character_shift = 0; |
22 | 22 | ||
23 | void enabled_printing() { | 23 | void enable_printing(void) { |
24 | printing_enabled = true; | 24 | printing_enabled = true; |
25 | serial_init(); | 25 | serial_init(); |
26 | } | 26 | } |
27 | 27 | ||
28 | void disable_printing() { | 28 | void disable_printing(void) { |
29 | printing_enabled = false; | 29 | printing_enabled = false; |
30 | } | 30 | } |
31 | 31 | ||
@@ -41,9 +41,14 @@ void print_char(char c) { | |||
41 | USB_Init(); | 41 | USB_Init(); |
42 | } | 42 | } |
43 | 43 | ||
44 | void print_box_string(uint8_t text[]) { | 44 | void print_string(char c[]) { |
45 | uint8_t len = strlen(text); | 45 | for(uint8_t i = 0; i < strlen(c); i++) |
46 | uint8_t out[len * 3 + 8]; | 46 | print_char(c[i]); |
47 | } | ||
48 | |||
49 | void print_box_string(const char text[]) { | ||
50 | size_t len = strlen(text); | ||
51 | char out[len * 3 + 8]; | ||
47 | out[0] = 0xDA; | 52 | out[0] = 0xDA; |
48 | for (uint8_t i = 0; i < len; i++) { | 53 | for (uint8_t i = 0; i < len; i++) { |
49 | out[i+1] = 0xC4; | 54 | out[i+1] = 0xC4; |
@@ -69,14 +74,9 @@ void print_box_string(uint8_t text[]) { | |||
69 | print_string(out); | 74 | print_string(out); |
70 | } | 75 | } |
71 | 76 | ||
72 | void print_string(char c[]) { | ||
73 | for(uint8_t i = 0; i < strlen(c); i++) | ||
74 | print_char(c[i]); | ||
75 | } | ||
76 | |||
77 | bool process_printer(uint16_t keycode, keyrecord_t *record) { | 77 | bool process_printer(uint16_t keycode, keyrecord_t *record) { |
78 | if (keycode == PRINT_ON) { | 78 | if (keycode == PRINT_ON) { |
79 | enabled_printing(); | 79 | enable_printing(); |
80 | return false; | 80 | return false; |
81 | } | 81 | } |
82 | if (keycode == PRINT_OFF) { | 82 | if (keycode == PRINT_OFF) { |
diff --git a/quantum/process_keycode/process_printer.h b/quantum/process_keycode/process_printer.h index aa494ac8a..71d3a4b56 100644 --- a/quantum/process_keycode/process_printer.h +++ b/quantum/process_keycode/process_printer.h | |||
@@ -21,4 +21,6 @@ | |||
21 | 21 | ||
22 | #include "protocol/serial.h" | 22 | #include "protocol/serial.h" |
23 | 23 | ||
24 | bool process_printer(uint16_t keycode, keyrecord_t *record); | ||
25 | |||
24 | #endif | 26 | #endif |
diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c index 55d3b552b..3a00f169d 100644 --- a/quantum/process_keycode/process_printer_bb.c +++ b/quantum/process_keycode/process_printer_bb.c | |||
@@ -46,7 +46,7 @@ void serial_output(void) { | |||
46 | } | 46 | } |
47 | 47 | ||
48 | 48 | ||
49 | void enabled_printing() { | 49 | void enable_printing() { |
50 | printing_enabled = true; | 50 | printing_enabled = true; |
51 | serial_output(); | 51 | serial_output(); |
52 | serial_high(); | 52 | serial_high(); |
@@ -82,7 +82,7 @@ void print_string(char c[]) { | |||
82 | 82 | ||
83 | bool process_printer(uint16_t keycode, keyrecord_t *record) { | 83 | bool process_printer(uint16_t keycode, keyrecord_t *record) { |
84 | if (keycode == PRINT_ON) { | 84 | if (keycode == PRINT_ON) { |
85 | enabled_printing(); | 85 | enable_printing(); |
86 | return false; | 86 | return false; |
87 | } | 87 | } |
88 | if (keycode == PRINT_OFF) { | 88 | if (keycode == PRINT_OFF) { |
diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 678a15234..fd008eca1 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | #include "process_unicode.h" | 16 | #include "process_unicode.h" |
17 | #include "action_util.h" | 17 | #include "action_util.h" |
18 | #include "eeprom.h" | ||
18 | 19 | ||
19 | static uint8_t first_flag = 0; | 20 | static uint8_t first_flag = 0; |
20 | 21 | ||
diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 1dbdec3e7..84b5d673d 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "process_unicode_common.h" | 17 | #include "process_unicode_common.h" |
18 | #include "eeprom.h" | ||
18 | 19 | ||
19 | static uint8_t input_mode; | 20 | static uint8_t input_mode; |
20 | uint8_t mods; | 21 | uint8_t mods; |
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 94de36918..4ba1cc251 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c | |||
@@ -140,7 +140,6 @@ void process_record(keyrecord_t *record) | |||
140 | 140 | ||
141 | void process_action(keyrecord_t *record, action_t action) | 141 | void process_action(keyrecord_t *record, action_t action) |
142 | { | 142 | { |
143 | bool do_release_oneshot = false; | ||
144 | keyevent_t event = record->event; | 143 | keyevent_t event = record->event; |
145 | #ifndef NO_ACTION_TAPPING | 144 | #ifndef NO_ACTION_TAPPING |
146 | uint8_t tap_count = record->tap.count; | 145 | uint8_t tap_count = record->tap.count; |
@@ -152,6 +151,7 @@ void process_action(keyrecord_t *record, action_t action) | |||
152 | } | 151 | } |
153 | 152 | ||
154 | #ifndef NO_ACTION_ONESHOT | 153 | #ifndef NO_ACTION_ONESHOT |
154 | bool do_release_oneshot = false; | ||
155 | // notice we only clear the one shot layer if the pressed key is not a modifier. | 155 | // notice we only clear the one shot layer if the pressed key is not a modifier. |
156 | if (is_oneshot_layer_active() && event.pressed && !IS_MOD(action.key.code)) { | 156 | if (is_oneshot_layer_active() && event.pressed && !IS_MOD(action.key.code)) { |
157 | clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); | 157 | clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); |
diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 0c81e8361..1c7618ff5 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "suspend.h" | 9 | #include "suspend.h" |
10 | #include "timer.h" | 10 | #include "timer.h" |
11 | #include "led.h" | 11 | #include "led.h" |
12 | #include "host.h" | ||
12 | 13 | ||
13 | #ifdef PROTOCOL_LUFA | 14 | #ifdef PROTOCOL_LUFA |
14 | #include "lufa.h" | 15 | #include "lufa.h" |
diff --git a/tmk_core/common/mousekey.h b/tmk_core/common/mousekey.h index 6eede06b4..9338d0af7 100644 --- a/tmk_core/common/mousekey.h +++ b/tmk_core/common/mousekey.h | |||
@@ -23,8 +23,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
23 | 23 | ||
24 | 24 | ||
25 | /* max value on report descriptor */ | 25 | /* max value on report descriptor */ |
26 | #define MOUSEKEY_MOVE_MAX 127 | 26 | #ifndef MOUSEKEY_MOVE_MAX |
27 | #define MOUSEKEY_WHEEL_MAX 127 | 27 | #define MOUSEKEY_MOVE_MAX 127 |
28 | #elif MOUSEKEY_MOVE_MAX > 127 | ||
29 | #error MOUSEKEY_MOVE_MAX needs to be smaller than 127 | ||
30 | #endif | ||
31 | |||
32 | #ifndef MOUSEKEY_WHEEL_MAX | ||
33 | #define MOUSEKEY_WHEEL_MAX 127 | ||
34 | #elif MOUSEKEY_WHEEL_MAX > 127 | ||
35 | #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127 | ||
36 | #endif | ||
28 | 37 | ||
29 | #ifndef MOUSEKEY_MOVE_DELTA | 38 | #ifndef MOUSEKEY_MOVE_DELTA |
30 | #define MOUSEKEY_MOVE_DELTA 5 | 39 | #define MOUSEKEY_MOVE_DELTA 5 |
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index e4c8aecb2..b7cb0a559 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk | |||
@@ -92,6 +92,9 @@ endif | |||
92 | endif | 92 | endif |
93 | CFLAGS += -Wall | 93 | CFLAGS += -Wall |
94 | CFLAGS += -Wstrict-prototypes | 94 | CFLAGS += -Wstrict-prototypes |
95 | ifneq ($(strip $(ALLOW_WARNINGS)), yes) | ||
96 | CFLAGS += -Werror | ||
97 | endif | ||
95 | #CFLAGS += -mshort-calls | 98 | #CFLAGS += -mshort-calls |
96 | #CFLAGS += -fno-unit-at-a-time | 99 | #CFLAGS += -fno-unit-at-a-time |
97 | #CFLAGS += -Wundef | 100 | #CFLAGS += -Wundef |
@@ -115,6 +118,9 @@ CPPFLAGS += -O$(OPT) | |||
115 | CPPFLAGS += -w | 118 | CPPFLAGS += -w |
116 | CPPFLAGS += -Wall | 119 | CPPFLAGS += -Wall |
117 | CPPFLAGS += -Wundef | 120 | CPPFLAGS += -Wundef |
121 | ifneq ($(strip $(ALLOW_WARNINGS)), yes) | ||
122 | CPPFLAGS += -Werror | ||
123 | endif | ||
118 | #CPPFLAGS += -mshort-calls | 124 | #CPPFLAGS += -mshort-calls |
119 | #CPPFLAGS += -fno-unit-at-a-time | 125 | #CPPFLAGS += -fno-unit-at-a-time |
120 | #CPPFLAGS += -Wstrict-prototypes | 126 | #CPPFLAGS += -Wstrict-prototypes |