summaryrefslogtreecommitdiffstats
path: root/quantum/audio
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-11-21 05:25:38 +0100
committerJack Humbert <jack.humb@gmail.com>2017-11-21 05:37:38 +0100
commitb669d115c2969a58f0ae00f6ae5c2290dba44c03 (patch)
treecb6aaf1606105f1806be8c008e0ae6f3e9e36008 /quantum/audio
parent7ff96877d2a67fcfabbe2493e7c2a100f3b923da (diff)
downloadqmk_firmware-b669d115c2969a58f0ae00f6ae5c2290dba44c03.tar.gz
qmk_firmware-b669d115c2969a58f0ae00f6ae5c2290dba44c03.tar.xz
adds planck light keyboard
Diffstat (limited to 'quantum/audio')
-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()
#ifdef B5_AUDIO
TCCR1A = (0 << COM1A1) | (0 << COM1A0) | (1 << WGM11) | (0 << WGM10);
TCCR1B = (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (1 << CS11) | (0 << CS10);
+
+ TIMER_1_PERIOD = (uint16_t)(((float)F_CPU) / (440 * CPU_PRESCALER));
+ TIMER_1_DUTY_CYCLE = (uint16_t)((((float)F_CPU) / (440 * CPU_PRESCALER)) * note_timbre);
#endif
audio_initialized = true;
@@ -192,7 +195,7 @@ void audio_init()
if (audio_config.enable) {
PLAY_SONG(startup_song);
}
-
+
}
void stop_all_notes()