diff options
author | Drashna Jaelre <drashna@live.com> | 2018-05-08 18:46:29 -0700 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2018-09-25 13:28:36 -0700 |
commit | e72e4b6920299176a322a2862f930b7ee5f73dff (patch) | |
tree | 1bd34f2b6fe46d08589699d5b47c984fc66d26f7 /quantum/audio | |
parent | b7e25f9ec4203670f2434e82608554ba284cf1f3 (diff) | |
download | qmk_firmware-e72e4b6920299176a322a2862f930b7ee5f73dff.tar.gz qmk_firmware-e72e4b6920299176a322a2862f930b7ee5f73dff.zip |
Store Clicky status in EEPROM
Diffstat (limited to 'quantum/audio')
-rw-r--r-- | quantum/audio/audio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index c948a60d6..6d6833ec1 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c | |||
@@ -223,7 +223,7 @@ void audio_init() | |||
223 | TCCR1B = (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (1 << CS11) | (0 << CS10); | 223 | TCCR1B = (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (1 << CS11) | (0 << CS10); |
224 | TIMER_1_PERIOD = (uint16_t)(((float)F_CPU) / (440 * CPU_PRESCALER)); | 224 | TIMER_1_PERIOD = (uint16_t)(((float)F_CPU) / (440 * CPU_PRESCALER)); |
225 | TIMER_1_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (440 * CPU_PRESCALER)) * note_timbre); | 225 | TIMER_1_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (440 * CPU_PRESCALER)) * note_timbre); |
226 | #endif | 226 | #endif |
227 | 227 | ||
228 | audio_initialized = true; | 228 | audio_initialized = true; |
229 | } | 229 | } |
@@ -231,7 +231,7 @@ void audio_init() | |||
231 | if (audio_config.enable) { | 231 | if (audio_config.enable) { |
232 | PLAY_SONG(startup_song); | 232 | PLAY_SONG(startup_song); |
233 | } | 233 | } |
234 | 234 | ||
235 | } | 235 | } |
236 | 236 | ||
237 | void stop_all_notes() | 237 | void stop_all_notes() |
@@ -464,7 +464,7 @@ ISR(TIMER3_AUDIO_vect) | |||
464 | note_position++; | 464 | note_position++; |
465 | bool end_of_note = false; | 465 | bool end_of_note = false; |
466 | if (TIMER_3_PERIOD > 0) { | 466 | if (TIMER_3_PERIOD > 0) { |
467 | if (!note_resting) | 467 | if (!note_resting) |
468 | end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF - 1)); | 468 | end_of_note = (note_position >= (note_length / TIMER_3_PERIOD * 0xFFFF - 1)); |
469 | else | 469 | else |
470 | end_of_note = (note_position >= (note_length)); | 470 | end_of_note = (note_position >= (note_length)); |
@@ -604,7 +604,7 @@ ISR(TIMER1_AUDIO_vect) | |||
604 | note_position++; | 604 | note_position++; |
605 | bool end_of_note = false; | 605 | bool end_of_note = false; |
606 | if (TIMER_1_PERIOD > 0) { | 606 | if (TIMER_1_PERIOD > 0) { |
607 | if (!note_resting) | 607 | if (!note_resting) |
608 | end_of_note = (note_position >= (note_length / TIMER_1_PERIOD * 0xFFFF - 1)); | 608 | end_of_note = (note_position >= (note_length / TIMER_1_PERIOD * 0xFFFF - 1)); |
609 | else | 609 | else |
610 | end_of_note = (note_position >= (note_length)); | 610 | end_of_note = (note_position >= (note_length)); |