diff options
author | IBNobody <ibnobody@gmail.com> | 2016-04-17 20:14:37 -0500 |
---|---|---|
committer | IBNobody <ibnobody@gmail.com> | 2016-04-17 20:14:37 -0500 |
commit | 5c98ad59606ee95b82c27bf2525383a9ec88542b (patch) | |
tree | 99124a3567045aff6922a39a7062f27bd38e132a /quantum/keymap_common.c | |
parent | 23231fa577f7c6c585124226a83f21a7668e62dd (diff) | |
download | qmk_firmware-5c98ad59606ee95b82c27bf2525383a9ec88542b.tar.gz qmk_firmware-5c98ad59606ee95b82c27bf2525383a9ec88542b.zip |
Added extra songs, LED indicator notes
Diffstat (limited to 'quantum/keymap_common.c')
-rw-r--r-- | quantum/keymap_common.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 2001438b9..4ee290ad0 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c | |||
@@ -34,12 +34,6 @@ extern keymap_config_t keymap_config; | |||
34 | #include <inttypes.h> | 34 | #include <inttypes.h> |
35 | #ifdef AUDIO_ENABLE | 35 | #ifdef AUDIO_ENABLE |
36 | #include "audio.h" | 36 | #include "audio.h" |
37 | |||
38 | #ifndef TONE_GOODBYE | ||
39 | #define TONE_GOODBYE OLKB_GOODBYE | ||
40 | #endif /*! TONE_GOODBYE */ | ||
41 | |||
42 | float tone_goodbye[][2] = SONG(TONE_GOODBYE); | ||
43 | #endif /* AUDIO_ENABLE */ | 37 | #endif /* AUDIO_ENABLE */ |
44 | 38 | ||
45 | static action_t keycode_to_action(uint16_t keycode); | 39 | static action_t keycode_to_action(uint16_t keycode); |
@@ -47,7 +41,7 @@ static action_t keycode_to_action(uint16_t keycode); | |||
47 | /* converts key to action */ | 41 | /* converts key to action */ |
48 | action_t action_for_key(uint8_t layer, keypos_t key) | 42 | action_t action_for_key(uint8_t layer, keypos_t key) |
49 | { | 43 | { |
50 | // 16bit keycodes - important | 44 | // 16bit keycodes - important |
51 | uint16_t keycode = keymap_key_to_keycode(layer, key); | 45 | uint16_t keycode = keymap_key_to_keycode(layer, key); |
52 | 46 | ||
53 | switch (keycode) { | 47 | switch (keycode) { |
@@ -190,7 +184,7 @@ static action_t keycode_to_action(uint16_t keycode) | |||
190 | case RESET: ; // RESET is 0x5000, which is why this is here | 184 | case RESET: ; // RESET is 0x5000, which is why this is here |
191 | clear_keyboard(); | 185 | clear_keyboard(); |
192 | #ifdef AUDIO_ENABLE | 186 | #ifdef AUDIO_ENABLE |
193 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | 187 | play_goodbye_tone(); |
194 | #endif | 188 | #endif |
195 | _delay_ms(250); | 189 | _delay_ms(250); |
196 | #ifdef ATREUS_ASTAR | 190 | #ifdef ATREUS_ASTAR |
@@ -303,7 +297,7 @@ static action_t keycode_to_action(uint16_t keycode) | |||
303 | /* translates key to keycode */ | 297 | /* translates key to keycode */ |
304 | uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) | 298 | uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) |
305 | { | 299 | { |
306 | // Read entire word (16bits) | 300 | // Read entire word (16bits) |
307 | return pgm_read_word(&keymaps[(layer)][(key.row)][(key.col)]); | 301 | return pgm_read_word(&keymaps[(layer)][(key.row)][(key.col)]); |
308 | } | 302 | } |
309 | 303 | ||
@@ -315,7 +309,7 @@ action_t keymap_fn_to_action(uint16_t keycode) | |||
315 | 309 | ||
316 | action_t keymap_func_to_action(uint16_t keycode) | 310 | action_t keymap_func_to_action(uint16_t keycode) |
317 | { | 311 | { |
318 | // For FUNC without 8bit limit | 312 | // For FUNC without 8bit limit |
319 | return (action_t){ .code = pgm_read_word(&fn_actions[(int)keycode]) }; | 313 | return (action_t){ .code = pgm_read_word(&fn_actions[(int)keycode]) }; |
320 | } | 314 | } |
321 | 315 | ||