From d13ada11622977bcc0b530212b4405229805016d Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 6 Nov 2019 08:04:50 +1100 Subject: Add customisable EEPROM driver selection (#7274) - uprintf -> dprintf - Fix atsam "vendor" eeprom. - Bump Kinetis K20x to 64 bytes, too. - Rollback Kinetis to 32 bytes as partitioning can only be done once. Add warning about changing the value. - Change RAM-backed "fake" EEPROM implementations to match eeconfig's current usage. - Add 24LC128 by request. --- quantum/audio/audio_arm.c | 2 +- quantum/rgblight.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'quantum') diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c index 87d625301f..e4483c3028 100644 --- a/quantum/audio/audio_arm.c +++ b/quantum/audio/audio_arm.c @@ -258,7 +258,7 @@ void audio_init() { } // Check EEPROM -#if defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) +#ifdef EEPROM_ENABLE if (!eeconfig_is_enabled()) { eeconfig_init(); } diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 40de19eac3..67d601af7f 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -19,9 +19,11 @@ # include # include #endif +#ifdef EEPROM_ENABLE +# include "eeprom.h" +#endif #ifdef STM32_EEPROM_ENABLE # include "hal.h" -# include "eeprom.h" # include "eeprom_stm32.h" #endif #include "wait.h" @@ -146,7 +148,7 @@ void rgblight_check_config(void) { } uint32_t eeconfig_read_rgblight(void) { -#if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) +#ifdef EEPROM_ENABLE return eeprom_read_dword(EECONFIG_RGBLIGHT); #else return 0; @@ -154,7 +156,7 @@ uint32_t eeconfig_read_rgblight(void) { } void eeconfig_update_rgblight(uint32_t val) { -#if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) +#ifdef EEPROM_ENABLE rgblight_check_config(); eeprom_update_dword(EECONFIG_RGBLIGHT, val); #endif -- cgit v1.2.3