From 0faa18eab996c2cfcc5da0b60b702f52335c5854 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 15 Apr 2016 23:38:21 -0400 Subject: audio enable stored in eeprom --- tmk_core/common/avr/eeconfig.c | 8 ++++++++ tmk_core/common/eeconfig.h | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'tmk_core/common') diff --git a/tmk_core/common/avr/eeconfig.c b/tmk_core/common/avr/eeconfig.c index 5bd47dc6ad..d0c3f4f570 100644 --- a/tmk_core/common/avr/eeconfig.c +++ b/tmk_core/common/avr/eeconfig.c @@ -13,6 +13,9 @@ void eeconfig_init(void) #ifdef BACKLIGHT_ENABLE eeprom_write_byte(EECONFIG_BACKLIGHT, 0); #endif +#ifdef AUDIO_ENABLE + eeprom_write_byte(EECONFIG_AUDIO, 0); +#endif } void eeconfig_enable(void) @@ -43,3 +46,8 @@ void eeconfig_write_keymap(uint8_t val) { eeprom_write_byte(EECONFIG_KEYMAP, val uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); } void eeconfig_write_backlight(uint8_t val) { eeprom_write_byte(EECONFIG_BACKLIGHT, val); } #endif + +#ifdef AUDIO_ENABLE +uint8_t eeconfig_read_audio(void) { return eeprom_read_byte(EECONFIG_AUDIO); } +void eeconfig_write_audio(uint8_t val) { eeprom_write_byte(EECONFIG_AUDIO, val); } +#endif \ No newline at end of file diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 3cd1a174f6..ddefca1347 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -31,6 +31,7 @@ along with this program. If not, see . #define EECONFIG_KEYMAP (uint8_t *)4 #define EECONFIG_MOUSEKEY_ACCEL (uint8_t *)5 #define EECONFIG_BACKLIGHT (uint8_t *)6 +#define EECONFIG_AUDIO (uint8_t *)7 /* debug bit */ @@ -72,4 +73,9 @@ uint8_t eeconfig_read_backlight(void); void eeconfig_write_backlight(uint8_t val); #endif +#ifdef AUDIO_ENABLE +uint8_t eeconfig_read_audio(void); +void eeconfig_write_audio(uint8_t val); +#endif + #endif -- cgit v1.2.3