diff options
Diffstat (limited to 'keyboard')
-rw-r--r-- | keyboard/planck/keymaps/keymap_lock.c | 32 | ||||
-rw-r--r-- | keyboard/planck/planck.c | 29 |
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)(); } |