#include <stdint.h>
#include <stdbool.h>
-#include <avr/io.h>
-#include <util/delay.h>
+#if defined(__AVR__)
+ #include <avr/io.h>
+#endif
+#include "wait.h"
#include "musical_notes.h"
#include "song_list.h"
#include "voices.h"
#include "quantum.h"
+#include <math.h>
// Largely untested PWM audio mode (doesn't sound as good)
// #define PWM_AUDIO
uint8_t raw;
struct {
bool enable :1;
- uint8_t level :7;
+ bool clicky_enable :1;
+ uint8_t level :6;
};
} audio_config_t;
#define NOTE_ARRAY_SIZE(x) ((int16_t)(sizeof(x) / (sizeof(x[0]))))
#define PLAY_NOTE_ARRAY(note_array, note_repeat, deprecated_arg) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), (note_repeat)); \
_Pragma ("message \"'PLAY_NOTE_ARRAY' macro is deprecated\"")
-#define PLAY_SONG(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), false);
-#define PLAY_LOOP(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), true);
+#define PLAY_SONG(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), false)
+#define PLAY_LOOP(note_array) play_notes(¬e_array, NOTE_ARRAY_SIZE((note_array)), true)
bool is_playing_notes(void);