aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIBNobody <ibnobody@gmail.com>2016-04-13 20:57:51 -0500
committerIBNobody <ibnobody@gmail.com>2016-04-13 20:57:51 -0500
commit3755ef5ddbdad9f25a53fee951c3eb78035b52c3 (patch)
tree7a495b8756261ab2cc89173c1d250435df1d78ec
parent01f5b35396e5558a39e6f35ef9128b96c289c05c (diff)
downloadqmk_firmware-3755ef5ddbdad9f25a53fee951c3eb78035b52c3.tar.gz
qmk_firmware-3755ef5ddbdad9f25a53fee951c3eb78035b52c3.zip
Compiler Warnings / Atomic TLC
Corrected compiler warnings for a number of issues. Gave Atomic some TLC.
-rw-r--r--keyboard/atomic/Makefile4
-rw-r--r--keyboard/atomic/atomic.h3
-rw-r--r--keyboard/atomic/backlight.c2
-rw-r--r--keyboard/atomic/config.h95
-rw-r--r--keyboard/atomic/keymaps/default.c26
-rw-r--r--keyboard/atomic/keymaps/pc_atomic.c3
-rw-r--r--quantum/keymap_common.c6
-rw-r--r--quantum/keymap_common.h2
-rw-r--r--quantum/keymap_midi.h2
-rw-r--r--tmk_core/common/action_code.h2
-rw-r--r--tmk_core/common/keymap.c3
11 files changed, 113 insertions, 35 deletions
diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile
index 17baeaf53..2b017446d 100644
--- a/keyboard/atomic/Makefile
+++ b/keyboard/atomic/Makefile
@@ -120,13 +120,13 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
120CONSOLE_ENABLE = yes # Console for debug(+400) 120CONSOLE_ENABLE = yes # Console for debug(+400)
121COMMAND_ENABLE = yes # Commands for debug and configuration 121COMMAND_ENABLE = yes # Commands for debug and configuration
122#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA 122#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
123#BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 123BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
124#MIDI_ENABLE = yes # MIDI controls 124#MIDI_ENABLE = yes # MIDI controls
125#UNICODE_ENABLE = yes # Unicode 125#UNICODE_ENABLE = yes # Unicode
126#BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID 126#BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
127 127
128# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 128# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
129#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend 129#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
130 130
131# Optimize size but this may cause error "relocation truncated to fit" 131# Optimize size but this may cause error "relocation truncated to fit"
132#EXTRALDFLAGS = -Wl,--relax 132#EXTRALDFLAGS = -Wl,--relax
diff --git a/keyboard/atomic/atomic.h b/keyboard/atomic/atomic.h
index d8574efa9..d5461e424 100644
--- a/keyboard/atomic/atomic.h
+++ b/keyboard/atomic/atomic.h
@@ -26,5 +26,8 @@
26 26
27void matrix_init_user(void); 27void matrix_init_user(void);
28void matrix_scan_user(void); 28void matrix_scan_user(void);
29void process_action_user(keyrecord_t *record);
30void led_set_user(uint8_t usb_led);
31void backlight_init_ports(void);
29 32
30#endif \ No newline at end of file 33#endif \ No newline at end of file
diff --git a/keyboard/atomic/backlight.c b/keyboard/atomic/backlight.c
index f69364b2a..647b57e71 100644
--- a/keyboard/atomic/backlight.c
+++ b/keyboard/atomic/backlight.c
@@ -1,6 +1,8 @@
1 1
2#include <avr/io.h> 2#include <avr/io.h>
3#include "backlight.h" 3#include "backlight.h"
4#include "atomic.h"
5
4 6
5#define CHANNEL OCR1C 7#define CHANNEL OCR1C
6 8
diff --git a/keyboard/atomic/config.h b/keyboard/atomic/config.h
index 11c0e848e..f30a9e6cc 100644
--- a/keyboard/atomic/config.h
+++ b/keyboard/atomic/config.h
@@ -32,36 +32,109 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
32#define MATRIX_ROWS 5 32#define MATRIX_ROWS 5
33#define MATRIX_COLS 15 33#define MATRIX_COLS 15
34 34
35// Planck PCB default pin-out 35/*
36// Change this to how you wired your keyboard 36 * Keyboard Matrix Assignments
37// COLS: Left to right, ROWS: Top to bottom 37 *
38 * Change this to how you wired your keyboard
39 * COLS: AVR pins used for columns, left to right
40 * ROWS: AVR pins used for rows, top to bottom
41 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
42 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
43 *
44*/
38#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 } 45#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7, D3, D2, D1 }
39#define ROWS (int []){ D0, D5, B5, B6, C6 } 46#define ROWS (int []){ D0, D5, B5, B6, C6 }
40 47
41/* COL2ROW or ROW2COL */ 48/* COL2ROW or ROW2COL */
42#define DIODE_DIRECTION COL2ROW 49#define DIODE_DIRECTION COL2ROW
43 50
44/* define if matrix has ghost */ 51/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
52#define DEBOUNCE 5
53
54/* define if matrix has ghost (lacks anti-ghosting diodes) */
45//#define MATRIX_HAS_GHOST 55//#define MATRIX_HAS_GHOST
46 56
47/* number of backlight levels */ 57/* number of backlight levels */
48/* NOTE: this is the max value of 0..BACKLIGHT_LEVELS so really 16 levels. */
49#define BACKLIGHT_LEVELS 3 58#define BACKLIGHT_LEVELS 3
50 59
51/* Set 0 if debouncing isn't needed */
52#define DEBOUNCE 5
53
54/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ 60/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
55#define LOCKING_SUPPORT_ENABLE 61#define LOCKING_SUPPORT_ENABLE
56/* Locking resynchronize hack */ 62/* Locking resynchronize hack */
57#define LOCKING_RESYNC_ENABLE 63#define LOCKING_RESYNC_ENABLE
58 64
59/* key combination for command */ 65/*
66 * Force NKRO
67 *
68 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
69 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
70 * makefile for this to work.)
71 *
72 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
73 * until the next keyboard reset.
74 *
75 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
76 * fully operational during normal computer usage.
77 *
78 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
79 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
80 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
81 * power-up.
82 *
83 */
84//#define FORCE_NKRO
85
86/*
87 * Magic Key Options
88 *
89 * Magic keys are hotkey commands that allow control over firmware functions of
90 * the keyboard. They are best used in combination with the HID Listen program,
91 * found here: https://www.pjrc.com/teensy/hid_listen.html
92 *
93 * The options below allow the magic key functionality to be changed. This is
94 * useful if your keyboard/keypad is missing keys and you want magic key support.
95 *
96 */
97
98/* key combination for magic key command */
60#define IS_COMMAND() ( \ 99#define IS_COMMAND() ( \
61 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ 100 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
62) 101)
63 102
64 103/* control how magic key switches layers */
104//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
105//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
106//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
107
108/* override magic key keymap */
109//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
110//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
111//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
112//#define MAGIC_KEY_HELP1 H
113//#define MAGIC_KEY_HELP2 SLASH
114//#define MAGIC_KEY_DEBUG D
115//#define MAGIC_KEY_DEBUG_MATRIX X
116//#define MAGIC_KEY_DEBUG_KBD K
117//#define MAGIC_KEY_DEBUG_MOUSE M
118//#define MAGIC_KEY_VERSION V
119//#define MAGIC_KEY_STATUS S
120//#define MAGIC_KEY_CONSOLE C
121//#define MAGIC_KEY_LAYER0_ALT1 ESC
122//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
123//#define MAGIC_KEY_LAYER0 0
124//#define MAGIC_KEY_LAYER1 1
125//#define MAGIC_KEY_LAYER2 2
126//#define MAGIC_KEY_LAYER3 3
127//#define MAGIC_KEY_LAYER4 4
128//#define MAGIC_KEY_LAYER5 5
129//#define MAGIC_KEY_LAYER6 6
130//#define MAGIC_KEY_LAYER7 7
131//#define MAGIC_KEY_LAYER8 8
132//#define MAGIC_KEY_LAYER9 9
133//#define MAGIC_KEY_BOOTLOADER PAUSE
134//#define MAGIC_KEY_LOCK CAPS
135//#define MAGIC_KEY_EEPROM E
136//#define MAGIC_KEY_NKRO N
137//#define MAGIC_KEY_SLEEP_LED Z
65 138
66/* 139/*
67 * Feature disable options 140 * Feature disable options
@@ -81,6 +154,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
81//#define NO_ACTION_MACRO 154//#define NO_ACTION_MACRO
82//#define NO_ACTION_FUNCTION 155//#define NO_ACTION_FUNCTION
83 156
84#define MAGIC_KEY_BOOTLOADER B
85
86#endif 157#endif
diff --git a/keyboard/atomic/keymaps/default.c b/keyboard/atomic/keymaps/default.c
index 4ed8a71f1..0ede363a1 100644
--- a/keyboard/atomic/keymaps/default.c
+++ b/keyboard/atomic/keymaps/default.c
@@ -11,7 +11,7 @@
11#define _DV 2 11#define _DV 2
12#define _LW 3 12#define _LW 3
13#define _RS 4 13#define _RS 4
14#define _FN 4 14#define _FN 5
15 15
16/* ROW 1 OPTIONS 16/* ROW 1 OPTIONS
17 * .--------------------------------------------------------------------------------------------------------------------------------------. 17 * .--------------------------------------------------------------------------------------------------------------------------------------.
@@ -148,11 +148,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
148 * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. 148 * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
149 * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | 149 * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . |
150 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| 150 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
151 * | | | | | | | | | | | | | | | INS | 151 * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS |
152 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| 152 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
153 * | | | | | | | | | | | | | XXXXXX . | | 153 * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | |
154 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| 154 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
155 * | | | | | | | | | | | | XXXXXX . | | | 155 * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | |
156 * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| 156 * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
157 * | | | | | | XXXXXX . | | | | | | | | | 157 * | | | | | | XXXXXX . | | | | | | | | |
158 * '--------------------------------------------------------------------------------------------------------------------------------------' 158 * '--------------------------------------------------------------------------------------------------------------------------------------'
@@ -160,9 +160,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
160 160
161 [_LW] = { /* LOWERED */ 161 [_LW] = { /* LOWERED */
162 { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, 162 { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ },
163 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS }, 163 { _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, KC_INS },
164 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, 164 { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, ___T___, ___T___, _______ },
165 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, 165 { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ },
166 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, 166 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
167 }, 167 },
168 168
@@ -170,11 +170,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
170 * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. 170 * .---------------------------------------------------------------------------------------------------------------------- 2u ------------.
171 * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | 171 * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . |
172 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| 172 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
173 * | | | | | | | | | | | | | | | INS | 173 * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS |
174 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| 174 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------|
175 * | | | | | | | | | | | | | XXXXXX . | | 175 * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | |
176 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| 176 * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------|
177 * | | | | | | | | | | | | XXXXXX . | | | 177 * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | |
178 * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| 178 * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------|
179 * | | | | | | XXXXXX . | | | | | | | | | 179 * | | | | | | XXXXXX . | | | | | | | | |
180 * '--------------------------------------------------------------------------------------------------------------------------------------' 180 * '--------------------------------------------------------------------------------------------------------------------------------------'
@@ -182,9 +182,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
182 182
183 [_RS] = { /* RAISED */ 183 [_RS] = { /* RAISED */
184 { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, 184 { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ },
185 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS }, 185 { _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, KC_INS },
186 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, 186 { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___, _______ },
187 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, 187 { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, ___T___, ___T___, _______, _______ },
188 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, 188 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
189 }, 189 },
190 190
diff --git a/keyboard/atomic/keymaps/pc_atomic.c b/keyboard/atomic/keymaps/pc_atomic.c
index 1c0425a76..bdf575046 100644
--- a/keyboard/atomic/keymaps/pc_atomic.c
+++ b/keyboard/atomic/keymaps/pc_atomic.c
@@ -6,6 +6,7 @@
6#define _FN 3 6#define _FN 3
7 7
8#define _______ KC_TRNS 8#define _______ KC_TRNS
9#define ___T___ KC_TRNS
9#define XXXXXXX KC_NO 10#define XXXXXXX KC_NO
10 11
11/* 12/*
@@ -48,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
48 { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, 49 { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ },
49 { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, 50 { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR },
50 { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, 51 { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U },
51 { _______, _______, _______, DF(_CM), DF(_DV), _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D }, 52 { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ___T___, ___T___, KC_MS_U, KC_WH_D },
52 { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, 53 { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R },
53 }, 54 },
54}; 55};
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index 2eef4f15a..ae6cddb34 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -87,6 +87,7 @@ action_t action_for_key(uint8_t layer, keypos_t key)
87 return action; 87 return action;
88#endif 88#endif
89 } else if (keycode == RESET) { // RESET is 0x5000, which is why this is here 89 } else if (keycode == RESET) { // RESET is 0x5000, which is why this is here
90 action_t action;
90 clear_keyboard(); 91 clear_keyboard();
91 #ifdef AUDIO_ENABLE 92 #ifdef AUDIO_ENABLE
92 play_notes(&goodbye, 5, false); 93 play_notes(&goodbye, 5, false);
@@ -96,12 +97,13 @@ action_t action_for_key(uint8_t layer, keypos_t key)
96 *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific 97 *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
97 #endif 98 #endif
98 bootloader_jump(); 99 bootloader_jump();
99 return; 100 return action;
100 } else if (keycode == DEBUG) { // DEBUG is 0x5001 101 } else if (keycode == DEBUG) { // DEBUG is 0x5001
101 // TODO: Does this actually work? 102 // TODO: Does this actually work?
103 action_t action;
102 print("\nDEBUG: enabled.\n"); 104 print("\nDEBUG: enabled.\n");
103 debug_enable = true; 105 debug_enable = true;
104 return; 106 return action;
105 } else if (keycode >= 0x5000 && keycode < 0x6000) { 107 } else if (keycode >= 0x5000 && keycode < 0x6000) {
106 // Layer movement shortcuts 108 // Layer movement shortcuts
107 // See .h to see constraints/usage 109 // See .h to see constraints/usage
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h
index 3db40772e..4a877d2a7 100644
--- a/quantum/keymap_common.h
+++ b/quantum/keymap_common.h
@@ -184,8 +184,6 @@ extern const uint16_t fn_actions[];
184// Toggle to layer - 256 layer max 184// Toggle to layer - 256 layer max
185#define TG(layer) (layer | 0x5400) 185#define TG(layer) (layer | 0x5400)
186 186
187#define MIDI(n) (n | 0x6000)
188
189// M-od, T-ap - 256 keycode max 187// M-od, T-ap - 256 keycode max
190#define MT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8)) 188#define MT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8))
191#define CTL_T(kc) MT(0x1, kc) 189#define CTL_T(kc) MT(0x1, kc)
diff --git a/quantum/keymap_midi.h b/quantum/keymap_midi.h
index a89420ce2..436fb2eb5 100644
--- a/quantum/keymap_midi.h
+++ b/quantum/keymap_midi.h
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
20 20
21#include <lufa.h> 21#include <lufa.h>
22 22
23#define MIDI 0x6000 23#define MIDI(n) (n | 0x6000)
24#define MIDI12 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000 24#define MIDI12 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000
25 25
26#define CHNL(note, channel) (note + (channel << 8)) 26#define CHNL(note, channel) (note + (channel << 8))
diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h
index 4fe9c1d58..2b0b0b077 100644
--- a/tmk_core/common/action_code.h
+++ b/tmk_core/common/action_code.h
@@ -301,7 +301,7 @@ enum backlight_opt {
301#define ACTION_BACKLIGHT_DECREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_DECREASE << 8) 301#define ACTION_BACKLIGHT_DECREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_DECREASE << 8)
302#define ACTION_BACKLIGHT_TOGGLE() ACTION(ACT_BACKLIGHT, BACKLIGHT_TOGGLE << 8) 302#define ACTION_BACKLIGHT_TOGGLE() ACTION(ACT_BACKLIGHT, BACKLIGHT_TOGGLE << 8)
303#define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP << 8) 303#define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP << 8)
304#define ACTION_BACKLIGHT_LEVEL(level) ACTION(ACT_BACKLIGHT, BACKLIGHT_LEVEL << 8 | level) 304#define ACTION_BACKLIGHT_LEVEL(level) ACTION(ACT_BACKLIGHT, BACKLIGHT_LEVEL << 8 | (level))
305/* Command */ 305/* Command */
306#define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt)<<8 | (addr)) 306#define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt)<<8 | (addr))
307/* Function */ 307/* Function */
diff --git a/tmk_core/common/keymap.c b/tmk_core/common/keymap.c
index 11f4aa8aa..8955fc710 100644
--- a/tmk_core/common/keymap.c
+++ b/tmk_core/common/keymap.c
@@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
22#include "action_macro.h" 22#include "action_macro.h"
23#include "wait.h" 23#include "wait.h"
24#include "debug.h" 24#include "debug.h"
25 25#include "bootloader.h"
26 26
27static action_t keycode_to_action(uint8_t keycode); 27static action_t keycode_to_action(uint8_t keycode);
28 28
@@ -143,6 +143,7 @@ static action_t keycode_to_action(uint8_t keycode)
143 action.code = ACTION_TRANSPARENT; 143 action.code = ACTION_TRANSPARENT;
144 break; 144 break;
145 case KC_BOOTLOADER: 145 case KC_BOOTLOADER:
146 action.code = ACTION_NO;
146 clear_keyboard(); 147 clear_keyboard();
147 wait_ms(50); 148 wait_ms(50);
148 bootloader_jump(); // not return 149 bootloader_jump(); // not return