summaryrefslogtreecommitdiff
path: root/quantum/audio
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/audio')
-rw-r--r--quantum/audio/audio.c5
-rw-r--r--quantum/audio/audio.h10
2 files changed, 10 insertions, 5 deletions
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c
index ca78a483ad..2570ad9cd1 100644
--- a/quantum/audio/audio.c
+++ b/quantum/audio/audio.c
@@ -18,6 +18,7 @@
#include "eeconfig.h"
#include "timer.h"
#include "wait.h"
+#include "util.h"
/* audio system:
*
@@ -112,6 +113,10 @@ static bool audio_initialized = false;
static bool audio_driver_stopped = true;
audio_config_t audio_config;
+void eeconfig_update_audio_current(void) {
+ eeconfig_update_audio(audio_config.raw);
+}
+
void audio_init(void) {
if (audio_initialized) {
return;
diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h
index fe23cf3ed1..497f3dafd0 100644
--- a/quantum/audio/audio.h
+++ b/quantum/audio/audio.h
@@ -43,11 +43,6 @@ typedef union {
};
} audio_config_t;
-// AVR/LUFA has a MIN, arm/chibios does not
-#ifndef MIN
-# define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
/*
* a 'musical note' is represented by pitch and duration; a 'musical tone' adds intensity and timbre
* https://en.wikipedia.org/wiki/Musical_tone
@@ -64,6 +59,11 @@ typedef struct {
// public interface
/**
+ * @brief Save the current choices to the eeprom
+ */
+void eeconfig_update_audio_current(void);
+
+/**
* @brief one-time initialization called by quantum/quantum.c
* @details usually done lazy, when some tones are to be played
*