summaryrefslogtreecommitdiff
path: root/keyboard/planck
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-01-11 18:00:07 -0500
committerJack Humbert <jack.humb@gmail.com>2016-01-11 18:00:07 -0500
commit263344d42f8b16e1cd80c4c871e15fa86208d086 (patch)
tree6d782a56a005aa97b3c11bfc28fbc60b4bee7219 /keyboard/planck
parent0f867796de6f24a202463e125c1b4bc961621bf7 (diff)
downloadqmk_firmware-263344d42f8b16e1cd80c4c871e15fa86208d086.tar.gz
qmk_firmware-263344d42f8b16e1cd80c4c871e15fa86208d086.zip
beeps on lock keymap
Diffstat (limited to 'keyboard/planck')
-rw-r--r--keyboard/planck/keymaps/keymap_lock.c32
-rw-r--r--keyboard/planck/planck.c29
2 files changed, 31 insertions, 30 deletions
diff --git a/keyboard/planck/keymaps/keymap_lock.c b/keyboard/planck/keymaps/keymap_lock.c
index c2bf0b7d81..c8e1b8fa86 100644
--- a/keyboard/planck/keymaps/keymap_lock.c
+++ b/keyboard/planck/keymaps/keymap_lock.c
@@ -107,7 +107,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
// note(0+24, 20);
} else {
unregister_code(KC_RSFT);
- // stop_all_notes();
+ stop_all_notes();
// backlight_set(0);
default_layer_and(0);
default_layer_or(0);
@@ -119,3 +119,33 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
}
return MACRO_NONE;
};
+
+
+void * matrix_init_user(void) {
+ init_notes();
+
+ play_note(((double)261.6*3)*pow(2.0,(36)/12.0), 0xF);
+ _delay_ms(50);
+
+ play_note(((double)261.6*3)*pow(2.0,(48)/12.0), 0xF);
+ _delay_ms(25);
+ stop_note(((double)261.6*3)*pow(2.0,(48)/12.0));
+
+ play_note(((double)261.6*3)*pow(2.0,(48)/12.0), 0xF);
+ _delay_ms(25);
+ stop_note(((double)261.6*3)*pow(2.0,(48)/12.0));
+
+
+ stop_note(((double)261.6*3)*pow(2.0,(36)/12.0));
+
+
+ play_note(((double)261.6*3)*pow(2.0,(62)/12.0), 0xF);
+ _delay_ms(50);
+ stop_note(((double)261.6*3)*pow(2.0,(62)/12.0));
+
+
+ play_note(((double)261.6*3)*pow(2.0,(64)/12.0), 0xF);
+ _delay_ms(50);
+ stop_note(((double)261.6*3)*pow(2.0,(64)/12.0));
+
+}
diff --git a/keyboard/planck/planck.c b/keyboard/planck/planck.c
index a986bd8812..b62862af04 100644
--- a/keyboard/planck/planck.c
+++ b/keyboard/planck/planck.c
@@ -19,35 +19,6 @@ void * matrix_init_kb(void) {
DDRE |= (1<<6);
PORTE |= (1<<6);
- init_notes();
-
- // play_note(((double)261.6*32)*pow(2.0,(36)/12.0), 0xF);
- // _delay_ms(50);
-
- // play_note(((double)261.6*32)*pow(2.0,(48)/12.0), 0xF);
- // _delay_ms(25);
- // stop_note(((double)261.6*32)*pow(2.0,(48)/12.0));
-
- // play_note(((double)261.6*32)*pow(2.0,(48)/12.0), 0xF);
- // _delay_ms(25);
- // stop_note(((double)261.6*32)*pow(2.0,(48)/12.0));
-
-
- // stop_note(((double)261.6*32)*pow(2.0,(36)/12.0));
-
-
- // play_note(((double)261.6*32)*pow(2.0,(62)/12.0), 0xF);
- // _delay_ms(50);
- // stop_note(((double)261.6*32)*pow(2.0,(62)/12.0));
-
-
- // play_note(((double)261.6*32)*pow(2.0,(64)/12.0), 0xF);
- // _delay_ms(50);
- // stop_note(((double)261.6*32)*pow(2.0,(64)/12.0));
-
-
-
-
if (matrix_init_user) {
(*matrix_init_user)();
}