]> git.donarmstrong.com Git - qmk_firmware.git/blob - quantum/audio.h
audio enable stored in eeprom
[qmk_firmware.git] / quantum / audio.h
1 #include <stdint.h>
2 #include <stdbool.h>
3 #include <avr/io.h>
4 #include <util/delay.h>
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
18 void play_sample(uint8_t * s, uint16_t l, bool r);
19 void play_note(double freq, int vol);
20 void stop_note(double freq);
21 void stop_all_notes();
22 void init_notes();
23 void play_notes(float (*np)[][2], uint8_t n_length, bool n_repeat);