summaryrefslogtreecommitdiff
path: root/keyboards/preonic/keymaps
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2023-11-26 03:59:18 -0800
committerGitHub <noreply@github.com>2023-11-26 22:59:18 +1100
commit3ef06aa732ce8063e11b2f983592529883f7ecbc (patch)
tree7fa143f938e711b6db1c2ed40c36298b8f7604c7 /keyboards/preonic/keymaps
parent4601f339e48b0116ca139dd06ce55ef0b9ed598f (diff)
Improve and Cleanup Shutdown callbacks (#21060)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
Diffstat (limited to 'keyboards/preonic/keymaps')
-rw-r--r--keyboards/preonic/keymaps/0xdec/keymap.c27
-rw-r--r--keyboards/preonic/keymaps/bucktooth/keymap.c44
-rw-r--r--keyboards/preonic/keymaps/jacwib/keymap.c46
-rw-r--r--keyboards/preonic/keymaps/nikchi/keymap.c44
-rw-r--r--keyboards/preonic/keymaps/smt/keymap.c44
-rw-r--r--keyboards/preonic/keymaps/that_canadian/keymap.c44
-rw-r--r--keyboards/preonic/keymaps/zach/zach_common_functions.c28
7 files changed, 0 insertions, 277 deletions
diff --git a/keyboards/preonic/keymaps/0xdec/keymap.c b/keyboards/preonic/keymaps/0xdec/keymap.c
index fafa5c4460..fad47842a5 100644
--- a/keyboards/preonic/keymaps/0xdec/keymap.c
+++ b/keyboards/preonic/keymaps/0xdec/keymap.c
@@ -81,13 +81,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef AUDIO_ENABLE
-
-float tone_startup[][2] = {
- {NOTE_B5, 20},
- {NOTE_B6, 8},
- {NOTE_DS6, 20},
- {NOTE_B6, 8}
-};
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_game[][2] = {
{NOTE_E6, 10} ,{NOTE_E6, 10} ,{NOTE_REST, 10} ,{NOTE_E6, 10} ,
@@ -95,26 +88,6 @@ float tone_game[][2] = {
{NOTE_G6, 10} ,{NOTE_REST, 30},
{NOTE_G5, 10} ,{NOTE_REST, 30}
};
-float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
-float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
-
-void startup_user(void) {
- _delay_ms(20); // gets rid of tick
- PLAY_SONG(tone_startup);
-}
-void shutdown_user(void) {
- PLAY_SONG(tone_goodbye);
- _delay_ms(150);
- stop_all_notes();
-}
-
-void music_on_user(void) {
- music_scale_user();
-}
-void music_scale_user(void) {
- PLAY_SONG(music_scale);
-}
-
#endif
diff --git a/keyboards/preonic/keymaps/bucktooth/keymap.c b/keyboards/preonic/keymaps/bucktooth/keymap.c
index 593083f201..09602a1673 100644
--- a/keyboards/preonic/keymaps/bucktooth/keymap.c
+++ b/keyboards/preonic/keymaps/bucktooth/keymap.c
@@ -69,47 +69,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-
-#ifdef AUDIO_ENABLE
-float tone_startup[][2] = {
- {NOTE_C5, 8},
- {NOTE_E6, 4},
- {NOTE_D6, 16},
- {NOTE_G6, 8}
-};
-
-float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
-
-float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
-#endif
-
-void matrix_init_user(void) {
- #ifdef AUDIO_ENABLE
- startup_user();
- #endif
-}
-
-#ifdef AUDIO_ENABLE
-
-void startup_user(void)
-{
- PLAY_SONG(tone_startup);
-}
-
-void shutdown_user(void)
-{
- PLAY_SONG(tone_goodbye);
- stop_all_notes();
-}
-
-void music_on_user(void)
-{
- music_scale_user();
-}
-
-void music_scale_user(void)
-{
- PLAY_SONG(music_scale);
-}
-
-#endif
diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c
index 9de460c2a4..694c44b3c7 100644
--- a/keyboards/preonic/keymaps/jacwib/keymap.c
+++ b/keyboards/preonic/keymaps/jacwib/keymap.c
@@ -174,19 +174,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-#ifdef AUDIO_ENABLE
-float tone_startup[][2] = {
- {NOTE_D5, 8},
- {NOTE_E6, 8},
- {NOTE_D6, 8},
- {NOTE_E5, 8}
-};
-
-float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
-
-float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
-#endif
-
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
@@ -249,36 +236,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
};
-
-void matrix_init_user(void) {
- #ifdef AUDIO_ENABLE
- startup_user();
- #endif
-}
-
-#ifdef AUDIO_ENABLE
-
-void startup_user(void)
-{
- _delay_ms(20); // gets rid of tick
- PLAY_SONG(tone_startup);
-}
-
-void shutdown_user(void)
-{
- PLAY_SONG(tone_goodbye);
- _delay_ms(150);
- stop_all_notes();
-}
-
-void music_on_user(void)
-{
- music_scale_user();
-}
-
-void music_scale_user(void)
-{
- PLAY_SONG(music_scale);
-}
-
-#endif
diff --git a/keyboards/preonic/keymaps/nikchi/keymap.c b/keyboards/preonic/keymaps/nikchi/keymap.c
index e14f8f0052..50589039b7 100644
--- a/keyboards/preonic/keymaps/nikchi/keymap.c
+++ b/keyboards/preonic/keymaps/nikchi/keymap.c
@@ -111,20 +111,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef AUDIO_ENABLE
-float tone_startup[][2] = {
- {NOTE_B5, 20},
- {NOTE_B6, 8},
- {NOTE_DS6, 20},
- {NOTE_B6, 8}
-};
-
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
-
-float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
-
-float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif
void persistent_default_layer_set(uint16_t default_layer) {
@@ -177,36 +166,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
};
-
-void matrix_init_user(void) {
- #ifdef AUDIO_ENABLE
- startup_user();
- #endif
-}
-
-#ifdef AUDIO_ENABLE
-
-void startup_user(void)
-{
- _delay_ms(20); // gets rid of tick
- PLAY_SONG(tone_startup);
-}
-
-void shutdown_user(void)
-{
- PLAY_SONG(tone_goodbye);
- _delay_ms(150);
- stop_all_notes();
-}
-
-void music_on_user(void)
-{
- music_scale_user();
-}
-
-void music_scale_user(void)
-{
- PLAY_SONG(music_scale);
-}
-
-#endif
diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c
index 7dd9545261..22f6c39a92 100644
--- a/keyboards/preonic/keymaps/smt/keymap.c
+++ b/keyboards/preonic/keymaps/smt/keymap.c
@@ -158,20 +158,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef AUDIO_ENABLE
-float tone_startup[][2] = {
- {NOTE_B5, 20},
- {NOTE_B6, 8},
- {NOTE_DS6, 20},
- {NOTE_B6, 8}
-};
-
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
-
-float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
-
-float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif
void persistent_default_layer_set(uint16_t default_layer) {
@@ -242,36 +231,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
};
-
-void matrix_init_user(void) {
- #ifdef AUDIO_ENABLE
- startup_user();
- #endif
-}
-
-#ifdef AUDIO_ENABLE
-
-void startup_user(void)
-{
- _delay_ms(20); // gets rid of tick
- PLAY_SONG(tone_startup);
-}
-
-void shutdown_user(void)
-{
- PLAY_SONG(tone_goodbye);
- _delay_ms(150);
- stop_all_notes();
-}
-
-void music_on_user(void)
-{
- music_scale_user();
-}
-
-void music_scale_user(void)
-{
- PLAY_SONG(music_scale);
-}
-
-#endif
diff --git a/keyboards/preonic/keymaps/that_canadian/keymap.c b/keyboards/preonic/keymaps/that_canadian/keymap.c
index 8af796821c..18b2e046e8 100644
--- a/keyboards/preonic/keymaps/that_canadian/keymap.c
+++ b/keyboards/preonic/keymaps/that_canadian/keymap.c
@@ -135,20 +135,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
#ifdef AUDIO_ENABLE
-float tone_startup[][2] = {
- {NOTE_B5, 20},
- {NOTE_B6, 8},
- {NOTE_DS6, 20},
- {NOTE_B6, 8}
-};
-
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
-
-float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
-
-float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
@@ -201,36 +190,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
};
-
-void matrix_init_user(void) {
- #ifdef AUDIO_ENABLE
- startup_user();
- #endif
-}
-
-#ifdef AUDIO_ENABLE
-
-void startup_user(void)
-{
- _delay_ms(20); // gets rid of tick
- PLAY_SONG(tone_startup);
-}
-
-void shutdown_user(void)
-{
- PLAY_SONG(tone_goodbye);
- _delay_ms(150);
- stop_all_notes();
-}
-
-void music_on_user(void)
-{
- music_scale_user();
-}
-
-void music_scale_user(void)
-{
- PLAY_SONG(music_scale);
-}
-
-#endif
diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c
index ae5f44e713..ba6c402526 100644
--- a/keyboards/preonic/keymaps/zach/zach_common_functions.c
+++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c
@@ -52,7 +52,6 @@ enum my_keycodes{
#ifdef AUDIO_ENABLE
#include "audio.h"
-float tone_startup[][2] = SONG(STARTUP_SOUND);
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_swcole[][2] = SONG(QWERTY_SOUND);
@@ -414,32 +413,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
-void matrix_init_user(void){ // Run once at startup
- #ifdef AUDIO_ENABLE
- _delay_ms(50); // gets rid of tick
- PLAY_SONG(tone_startup);
- #endif
-}
-
-#ifdef AUDIO_ENABLE
-void play_goodbye_tone(void){
- PLAY_SONG(tone_goodbye);
- _delay_ms(150);
-}
-
-void shutdown_user(void){
- PLAY_SONG(tone_goodbye);
- _delay_ms(150);
- stop_all_notes();
-}
-
-void music_on_user(void){ // Run when the music layer is turned on
- PLAY_SONG(tone_startup);
-}
-
-void music_off_user(void){ // Run when music is turned off
- PLAY_SONG(tone_goodbye);
-}
-#endif
#endif