aboutsummaryrefslogtreecommitdiff
path: root/quantum/audio/audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/audio/audio.c')
-rw-r--r--quantum/audio/audio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c
index e08233486..29bad8060 100644
--- a/quantum/audio/audio.c
+++ b/quantum/audio/audio.c
@@ -184,6 +184,9 @@ void audio_init()
184 #ifdef B5_AUDIO 184 #ifdef B5_AUDIO
185 TCCR1A = (0 << COM1A1) | (0 << COM1A0) | (1 << WGM11) | (0 << WGM10); 185 TCCR1A = (0 << COM1A1) | (0 << COM1A0) | (1 << WGM11) | (0 << WGM10);
186 TCCR1B = (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (1 << CS11) | (0 << CS10); 186 TCCR1B = (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (1 << CS11) | (0 << CS10);
187
188 TIMER_1_PERIOD = (uint16_t)(((float)F_CPU) / (440 * CPU_PRESCALER));
189 TIMER_1_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (440 * CPU_PRESCALER)) * note_timbre);
187 #endif 190 #endif
188 191
189 audio_initialized = true; 192 audio_initialized = true;
@@ -192,7 +195,7 @@ void audio_init()
192 if (audio_config.enable) { 195 if (audio_config.enable) {
193 PLAY_SONG(startup_song); 196 PLAY_SONG(startup_song);
194 } 197 }
195 198
196} 199}
197 200
198void stop_all_notes() 201void stop_all_notes()