aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/planck/keymaps/zach/Makefile2
-rw-r--r--keyboards/planck/keymaps/zach/config.h3
-rw-r--r--keyboards/planck/keymaps/zach/zach_common_functions.c61
-rw-r--r--keyboards/preonic/keymaps/zach/Makefile2
-rw-r--r--keyboards/preonic/keymaps/zach/zach_common_functions.c61
-rw-r--r--quantum/audio/song_list.h12
6 files changed, 19 insertions, 122 deletions
diff --git a/keyboards/planck/keymaps/zach/Makefile b/keyboards/planck/keymaps/zach/Makefile
index b0009147a..977f1a901 100644
--- a/keyboards/planck/keymaps/zach/Makefile
+++ b/keyboards/planck/keymaps/zach/Makefile
@@ -16,7 +16,7 @@ USB_6KRO_ENABLE = no # 6key Rollover
16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality 16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17MIDI_ENABLE = no # MIDI controls 17MIDI_ENABLE = no # MIDI controls
18AUDIO_ENABLE = no # Audio output on port C6 18AUDIO_ENABLE = no # Audio output on port C6
19VARIABLE_TRACE = no # Debug changes to variable values 19#VARIABLE_TRACE = no # Debug changes to variable values
20UNICODE_ENABLE = yes # Unicode 20UNICODE_ENABLE = yes # Unicode
21UNICODEMAP_ENABLE = yes # Enable extended unicode 21UNICODEMAP_ENABLE = yes # Enable extended unicode
22BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 22BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/keyboards/planck/keymaps/zach/config.h b/keyboards/planck/keymaps/zach/config.h
index 1be800545..7deb9ebfe 100644
--- a/keyboards/planck/keymaps/zach/config.h
+++ b/keyboards/planck/keymaps/zach/config.h
@@ -53,8 +53,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
53 53
54/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ 54/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
55//#define LOCKING_SUPPORT_ENABLE 55//#define LOCKING_SUPPORT_ENABLE
56#undef LOCKING_SUPPORT_ENABLE
56/* Locking resynchronize hack */ 57/* Locking resynchronize hack */
57//#define LOCKING_RESYNC_ENABLE 58//#define LOCKING_RESYNC_ENABLE
59#undef LOCKING_RESYNC_ENABLE
58 60
59/* key combination for command */ 61/* key combination for command */
60#define IS_COMMAND() ( \ 62#define IS_COMMAND() ( \
@@ -70,6 +72,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
70//#define NO_DEBUG 72//#define NO_DEBUG
71/* disable print */ 73/* disable print */
72//#define NO_PRINT 74//#define NO_PRINT
75#undef NO_PRINT
73 76
74/* disable action features */ 77/* disable action features */
75//#define NO_ACTION_LAYER 78//#define NO_ACTION_LAYER
diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c
index f01929f5d..7d14dcf3f 100644
--- a/keyboards/planck/keymaps/zach/zach_common_functions.c
+++ b/keyboards/planck/keymaps/zach/zach_common_functions.c
@@ -3,7 +3,6 @@
3#include "eeconfig.h" 3#include "eeconfig.h"
4#include "action_layer.h" 4#include "action_layer.h"
5#include "keymap_colemak.h" 5#include "keymap_colemak.h"
6#include "extra_functions.c"
7extern keymap_config_t keymap_config; 6extern keymap_config_t keymap_config;
8 7
9// Fillers to make layering more clear 8// Fillers to make layering more clear
@@ -249,7 +248,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
249 } 248 }
250 return false; 249 return false;
251 break; 250 break;
252 #ifndef TAP_DANCE_ENABLE
253 case RAISE: 251 case RAISE:
254 if(record->event.pressed){ 252 if(record->event.pressed){
255 layer_on(_RAISE); 253 layer_on(_RAISE);
@@ -270,7 +268,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
270 } 268 }
271 return false; 269 return false;
272 break; 270 break;
273 #endif
274 case SHFT_CAP: 271 case SHFT_CAP:
275 if(record->event.pressed){ 272 if(record->event.pressed){
276 key_timer = timer_read(); // if the key is being pressed, we start the timer. 273 key_timer = timer_read(); // if the key is being pressed, we start the timer.
@@ -441,62 +438,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
441 } 438 }
442 return false; 439 return false;
443 break; 440 break;
444 #ifdef TAP_DANCE_ENABLE
445 case TappyR:
446 if(record->event.pressed){
447 if(timer_elapsed32(Rtimer) > 1052){
448 Rstate = 0;
449 }
450 switch(Rstate){
451 case 0:
452 Rtimer = timer_read32();
453 Rstate++;
454 break;
455 case 1:
456 Rtimes[0] = timer_elapsed32(Rtimer);
457 Rtimer = timer_read32();
458 Rstate++;
459 break;
460 case 2:
461 Rtimes[1] = timer_elapsed32(Rtimer);
462 Rtimer = timer_read32();
463 Rstate++;
464 break;
465 case 3:
466 Rtimes[2] = timer_elapsed32(Rtimer);
467 Rstate = 0;
468 break;
469 }
470 if(Rstate == 0 && Lstate == 0) rhythm_parse();
471 }
472 return false;
473 break;
474 case TappyL:
475 if(record->event.pressed){
476 if(timer_elapsed32(Ltimer) > 1052){
477 Lstate = 0;
478 }
479 switch(Lstate){
480 case 0:
481 Ltimer = timer_read32();
482 Lstate++;
483 break;
484 case 1:
485 Ltimes[0] = timer_elapsed32(Ltimer);
486 Ltimer = timer_read32();
487 Lstate++;
488 break;
489 case 2:
490 Ltimes[1] = timer_elapsed32(Ltimer);
491 Lstate = 0;
492 break;
493 }
494 if(Rstate == 0 && Lstate == 0) rhythm_parse();
495 }
496 return false;
497 break;
498 #endif
499 #endif
500 case RANDIG: 441 case RANDIG:
501 if (record->event.pressed) { 442 if (record->event.pressed) {
502 tap_random_base64(); 443 tap_random_base64();
@@ -507,7 +448,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
507 return true; 448 return true;
508}; 449};
509 450
510#ifdef AUDIO_ENABLE
511void matrix_init_user(void){ // Run once at startup 451void matrix_init_user(void){ // Run once at startup
512 #ifdef AUDIO_ENABLE 452 #ifdef AUDIO_ENABLE
513 _delay_ms(50); // gets rid of tick 453 _delay_ms(50); // gets rid of tick
@@ -515,6 +455,7 @@ void matrix_init_user(void){ // Run once at startup
515 #endif 455 #endif
516} 456}
517 457
458#ifdef AUDIO_ENABLE
518void play_goodbye_tone(void){ 459void play_goodbye_tone(void){
519 PLAY_NOTE_ARRAY(tone_goodbye, false, 0); 460 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
520 _delay_ms(150); 461 _delay_ms(150);
diff --git a/keyboards/preonic/keymaps/zach/Makefile b/keyboards/preonic/keymaps/zach/Makefile
index bd49d142c..f0a84abac 100644
--- a/keyboards/preonic/keymaps/zach/Makefile
+++ b/keyboards/preonic/keymaps/zach/Makefile
@@ -16,7 +16,7 @@ USB_6KRO_ENABLE = no # 6key Rollover
16BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 16BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
17MIDI_ENABLE = no # MIDI controls 17MIDI_ENABLE = no # MIDI controls
18AUDIO_ENABLE = yes # Audio output on port C6 18AUDIO_ENABLE = yes # Audio output on port C6
19VARIABLE_TRACE = no # Debug changes to variable values 19#VARIABLE_TRACE = no # Debug changes to variable values
20UNICODE_ENABLE = yes # Unicode 20UNICODE_ENABLE = yes # Unicode
21UNICODEMAP_ENABLE = no # Enable extended unicode 21UNICODEMAP_ENABLE = no # Enable extended unicode
22BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 22BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c
index f01929f5d..7d14dcf3f 100644
--- a/keyboards/preonic/keymaps/zach/zach_common_functions.c
+++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c
@@ -3,7 +3,6 @@
3#include "eeconfig.h" 3#include "eeconfig.h"
4#include "action_layer.h" 4#include "action_layer.h"
5#include "keymap_colemak.h" 5#include "keymap_colemak.h"
6#include "extra_functions.c"
7extern keymap_config_t keymap_config; 6extern keymap_config_t keymap_config;
8 7
9// Fillers to make layering more clear 8// Fillers to make layering more clear
@@ -249,7 +248,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
249 } 248 }
250 return false; 249 return false;
251 break; 250 break;
252 #ifndef TAP_DANCE_ENABLE
253 case RAISE: 251 case RAISE:
254 if(record->event.pressed){ 252 if(record->event.pressed){
255 layer_on(_RAISE); 253 layer_on(_RAISE);
@@ -270,7 +268,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
270 } 268 }
271 return false; 269 return false;
272 break; 270 break;
273 #endif
274 case SHFT_CAP: 271 case SHFT_CAP:
275 if(record->event.pressed){ 272 if(record->event.pressed){
276 key_timer = timer_read(); // if the key is being pressed, we start the timer. 273 key_timer = timer_read(); // if the key is being pressed, we start the timer.
@@ -441,62 +438,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
441 } 438 }
442 return false; 439 return false;
443 break; 440 break;
444 #ifdef TAP_DANCE_ENABLE
445 case TappyR:
446 if(record->event.pressed){
447 if(timer_elapsed32(Rtimer) > 1052){
448 Rstate = 0;
449 }
450 switch(Rstate){
451 case 0:
452 Rtimer = timer_read32();
453 Rstate++;
454 break;
455 case 1:
456 Rtimes[0] = timer_elapsed32(Rtimer);
457 Rtimer = timer_read32();
458 Rstate++;
459 break;
460 case 2:
461 Rtimes[1] = timer_elapsed32(Rtimer);
462 Rtimer = timer_read32();
463 Rstate++;
464 break;
465 case 3:
466 Rtimes[2] = timer_elapsed32(Rtimer);
467 Rstate = 0;
468 break;
469 }
470 if(Rstate == 0 && Lstate == 0) rhythm_parse();
471 }
472 return false;
473 break;
474 case TappyL:
475 if(record->event.pressed){
476 if(timer_elapsed32(Ltimer) > 1052){
477 Lstate = 0;
478 }
479 switch(Lstate){
480 case 0:
481 Ltimer = timer_read32();
482 Lstate++;
483 break;
484 case 1:
485 Ltimes[0] = timer_elapsed32(Ltimer);
486 Ltimer = timer_read32();
487 Lstate++;
488 break;
489 case 2:
490 Ltimes[1] = timer_elapsed32(Ltimer);
491 Lstate = 0;
492 break;
493 }
494 if(Rstate == 0 && Lstate == 0) rhythm_parse();
495 }
496 return false;
497 break;
498 #endif
499 #endif
500 case RANDIG: 441 case RANDIG:
501 if (record->event.pressed) { 442 if (record->event.pressed) {
502 tap_random_base64(); 443 tap_random_base64();
@@ -507,7 +448,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
507 return true; 448 return true;
508}; 449};
509 450
510#ifdef AUDIO_ENABLE
511void matrix_init_user(void){ // Run once at startup 451void matrix_init_user(void){ // Run once at startup
512 #ifdef AUDIO_ENABLE 452 #ifdef AUDIO_ENABLE
513 _delay_ms(50); // gets rid of tick 453 _delay_ms(50); // gets rid of tick
@@ -515,6 +455,7 @@ void matrix_init_user(void){ // Run once at startup
515 #endif 455 #endif
516} 456}
517 457
458#ifdef AUDIO_ENABLE
518void play_goodbye_tone(void){ 459void play_goodbye_tone(void){
519 PLAY_NOTE_ARRAY(tone_goodbye, false, 0); 460 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
520 _delay_ms(150); 461 _delay_ms(150);
diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h
index 8022ca672..623f24f32 100644
--- a/quantum/audio/song_list.h
+++ b/quantum/audio/song_list.h
@@ -3,6 +3,10 @@
3#ifndef SONG_LIST_H 3#ifndef SONG_LIST_H
4#define SONG_LIST_H 4#define SONG_LIST_H
5 5
6#define COIN_SOUND \
7 E__NOTE(_A5 ),\
8 HD_NOTE(_E6 ),
9
6#define ODE_TO_JOY \ 10#define ODE_TO_JOY \
7 Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \ 11 Q__NOTE(_E4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_G4), \
8 Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \ 12 Q__NOTE(_G4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_D4), \
@@ -122,4 +126,12 @@
122 E__NOTE(_E5), \ 126 E__NOTE(_E5), \
123 E__NOTE(_D5), 127 E__NOTE(_D5),
124 128
129#define UNICODE_WINDOWS \
130 E__NOTE(_B5), \
131 S__NOTE(_E6),
132
133#define UNICODE_LINUX \
134 E__NOTE(_E6), \
135 S__NOTE(_B5),
136
125#endif 137#endif