summaryrefslogtreecommitdiffstats
path: root/quantum/audio.h
diff options
context:
space:
mode:
authorStephan Bösebeck <sb@caluga.de>2016-04-16 22:56:33 +0200
committerStephan Bösebeck <sb@caluga.de>2016-04-16 22:56:33 +0200
commit38a1d830faa138f6a7e094b3eda33dc528112ec7 (patch)
treeea7745744f1759741b09577f25faf616fb39dfa7 /quantum/audio.h
parent990254edecab782d6f2e71ebfc0b0dda4dc0781e (diff)
parent5f648b6c4060d586c343ea05562c607e2630dfc4 (diff)
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'quantum/audio.h')
-rw-r--r--quantum/audio.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/quantum/audio.h b/quantum/audio.h
index 99203cea7a..58270015df 100644
--- a/quantum/audio.h
+++ b/quantum/audio.h
@@ -3,9 +3,21 @@
#include <avr/io.h>
#include <util/delay.h>
+typedef union {
+ uint8_t raw;
+ struct {
+ bool enable :1;
+ uint8_t level :7;
+ };
+} audio_config_t;
+
+void audio_toggle(void);
+void audio_on(void);
+void audio_off(void);
+
void play_sample(uint8_t * s, uint16_t l, bool r);
void play_note(double freq, int vol);
void stop_note(double freq);
void stop_all_notes();
void init_notes();
-void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat); \ No newline at end of file
+void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat);