diff options
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/common/avr/eeconfig.c | 8 | ||||
| -rw-r--r-- | tmk_core/common/eeconfig.h | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tmk_core/common/avr/eeconfig.c b/tmk_core/common/avr/eeconfig.c index 5bd47dc6a..d0c3f4f57 100644 --- a/tmk_core/common/avr/eeconfig.c +++ b/tmk_core/common/avr/eeconfig.c | |||
| @@ -13,6 +13,9 @@ void eeconfig_init(void) | |||
| 13 | #ifdef BACKLIGHT_ENABLE | 13 | #ifdef BACKLIGHT_ENABLE |
| 14 | eeprom_write_byte(EECONFIG_BACKLIGHT, 0); | 14 | eeprom_write_byte(EECONFIG_BACKLIGHT, 0); |
| 15 | #endif | 15 | #endif |
| 16 | #ifdef AUDIO_ENABLE | ||
| 17 | eeprom_write_byte(EECONFIG_AUDIO, 0); | ||
| 18 | #endif | ||
| 16 | } | 19 | } |
| 17 | 20 | ||
| 18 | void eeconfig_enable(void) | 21 | void eeconfig_enable(void) |
| @@ -43,3 +46,8 @@ void eeconfig_write_keymap(uint8_t val) { eeprom_write_byte(EECONFIG_KEYMAP, val | |||
| 43 | uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); } | 46 | uint8_t eeconfig_read_backlight(void) { return eeprom_read_byte(EECONFIG_BACKLIGHT); } |
| 44 | void eeconfig_write_backlight(uint8_t val) { eeprom_write_byte(EECONFIG_BACKLIGHT, val); } | 47 | void eeconfig_write_backlight(uint8_t val) { eeprom_write_byte(EECONFIG_BACKLIGHT, val); } |
| 45 | #endif | 48 | #endif |
| 49 | |||
| 50 | #ifdef AUDIO_ENABLE | ||
| 51 | uint8_t eeconfig_read_audio(void) { return eeprom_read_byte(EECONFIG_AUDIO); } | ||
| 52 | void eeconfig_write_audio(uint8_t val) { eeprom_write_byte(EECONFIG_AUDIO, val); } | ||
| 53 | #endif \ No newline at end of file | ||
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 3cd1a174f..ddefca134 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h | |||
| @@ -31,6 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 31 | #define EECONFIG_KEYMAP (uint8_t *)4 | 31 | #define EECONFIG_KEYMAP (uint8_t *)4 |
| 32 | #define EECONFIG_MOUSEKEY_ACCEL (uint8_t *)5 | 32 | #define EECONFIG_MOUSEKEY_ACCEL (uint8_t *)5 |
| 33 | #define EECONFIG_BACKLIGHT (uint8_t *)6 | 33 | #define EECONFIG_BACKLIGHT (uint8_t *)6 |
| 34 | #define EECONFIG_AUDIO (uint8_t *)7 | ||
| 34 | 35 | ||
| 35 | 36 | ||
| 36 | /* debug bit */ | 37 | /* debug bit */ |
| @@ -72,4 +73,9 @@ uint8_t eeconfig_read_backlight(void); | |||
| 72 | void eeconfig_write_backlight(uint8_t val); | 73 | void eeconfig_write_backlight(uint8_t val); |
| 73 | #endif | 74 | #endif |
| 74 | 75 | ||
| 76 | #ifdef AUDIO_ENABLE | ||
| 77 | uint8_t eeconfig_read_audio(void); | ||
| 78 | void eeconfig_write_audio(uint8_t val); | ||
| 79 | #endif | ||
| 80 | |||
| 75 | #endif | 81 | #endif |
