diff options
Diffstat (limited to 'quantum/audio.h')
| -rw-r--r-- | quantum/audio.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/quantum/audio.h b/quantum/audio.h index 31f9a3579..58270015d 100644 --- a/quantum/audio.h +++ b/quantum/audio.h | |||
| @@ -3,9 +3,21 @@ | |||
| 3 | #include <avr/io.h> | 3 | #include <avr/io.h> |
| 4 | #include <util/delay.h> | 4 | #include <util/delay.h> |
| 5 | 5 | ||
| 6 | typedef union { | ||
| 7 | uint8_t raw; | ||
| 8 | struct { | ||
| 9 | bool enable :1; | ||
| 10 | uint8_t level :7; | ||
| 11 | }; | ||
| 12 | } audio_config_t; | ||
| 13 | |||
| 14 | void audio_toggle(void); | ||
| 15 | void audio_on(void); | ||
| 16 | void audio_off(void); | ||
| 17 | |||
| 6 | void play_sample(uint8_t * s, uint16_t l, bool r); | 18 | void play_sample(uint8_t * s, uint16_t l, bool r); |
| 7 | void play_note(double freq, int vol); | 19 | void play_note(double freq, int vol); |
| 8 | void stop_note(double freq); | 20 | void stop_note(double freq); |
| 9 | void stop_all_notes(void); | 21 | void stop_all_notes(); |
| 10 | void init_notes(void); | 22 | void init_notes(); |
| 11 | void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat); \ No newline at end of file | 23 | void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat); |
