summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-04-13 23:31:35 -0400
committerJack Humbert <jack.humb@gmail.com>2016-04-13 23:31:35 -0400
commitbdb6dceaebc358dd4aae593d51d3ba0dd61858a9 (patch)
treee5a4513740d4629203d3a663f1c39895cc842267 /quantum
parent200d5f506884ac2dda0bec2c0284f93a75ecad00 (diff)
parent7ff57503c61d72be62bb737af5f0efc5ad74b82a (diff)
Merge pull request #254 from IBNobody/master
Atomic TLC / Compiler Warning Fixes
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keymap_common.c6
-rw-r--r--quantum/keymap_common.h2
-rw-r--r--quantum/keymap_midi.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index 2eef4f15a7..ae6cddb343 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)
return action;
#endif
} else if (keycode == RESET) { // RESET is 0x5000, which is why this is here
+ action_t action;
clear_keyboard();
#ifdef AUDIO_ENABLE
play_notes(&goodbye, 5, false);
@@ -96,12 +97,13 @@ action_t action_for_key(uint8_t layer, keypos_t key)
*(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
#endif
bootloader_jump();
- return;
+ return action;
} else if (keycode == DEBUG) { // DEBUG is 0x5001
// TODO: Does this actually work?
+ action_t action;
print("\nDEBUG: enabled.\n");
debug_enable = true;
- return;
+ return action;
} else if (keycode >= 0x5000 && keycode < 0x6000) {
// Layer movement shortcuts
// See .h to see constraints/usage
diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h
index 3db40772e0..4a877d2a70 100644
--- a/quantum/keymap_common.h
+++ b/quantum/keymap_common.h
@@ -184,8 +184,6 @@ extern const uint16_t fn_actions[];
// Toggle to layer - 256 layer max
#define TG(layer) (layer | 0x5400)
-#define MIDI(n) (n | 0x6000)
-
// M-od, T-ap - 256 keycode max
#define MT(mod, kc) (kc | 0x7000 | ((mod & 0xF) << 8))
#define CTL_T(kc) MT(0x1, kc)
diff --git a/quantum/keymap_midi.h b/quantum/keymap_midi.h
index a89420ce2a..795f26380e 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/>.
#include <lufa.h>
-#define MIDI 0x6000
+#define MIDI(n) ((n) | 0x6000)
#define MIDI12 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000
#define CHNL(note, channel) (note + (channel << 8))