Skip to content

Commit

Permalink
First batch of eeconfig conversions.
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc committed Sep 2, 2024
1 parent a7ed82b commit f78412d
Show file tree
Hide file tree
Showing 22 changed files with 797 additions and 380 deletions.
5 changes: 5 additions & 0 deletions builddefs/common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/logging/debug.c \
$(QUANTUM_DIR)/logging/sendchar.c \

include $(QUANTUM_DIR)/nvm/rules.mk

VPATH += $(QUANTUM_DIR)/logging
# Fall back to lib/printf if there is no platform provided print
ifeq ("$(wildcard $(PLATFORM_PATH)/$(PLATFORM_KEY)/printf.mk)","")
Expand Down Expand Up @@ -625,6 +627,9 @@ ifeq ($(strip $(VIA_ENABLE)), yes)
RAW_ENABLE := yes
BOOTMAGIC_ENABLE := yes
TRI_LAYER_ENABLE := yes

QUANTUM_SRC += \
nvm_via.c
endif

VALID_CUSTOM_MATRIX_TYPES:= yes lite no
Expand Down
2 changes: 1 addition & 1 deletion drivers/eeprom/eeprom_transient.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
The size of the transient EEPROM buffer size.
*/
#ifndef TRANSIENT_EEPROM_SIZE
# include "eeconfig.h"
# include "nvm_eeconfig_eeprom.h"
# define TRANSIENT_EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO
#endif
3 changes: 2 additions & 1 deletion keyboards/horrortroll/nyx/rev1/lib/startup_swirl_anim.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <string.h>
#include <math.h>
#include <lib/lib8tion/lib8tion.h>
#include "eeconfig.h"

#define LED_TRAIL 10

Expand Down Expand Up @@ -105,7 +106,7 @@ static void swirl_set_color(HSV hsv) {
traverse_matrix();

if (!(top <= bottom && left <= right)) {
eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config));
eeconfig_read_rgb_matrix(&rgb_matrix_config);
rgb_matrix_mode_noeeprom(rgb_matrix_config.mode);
return;
}
Expand Down
9 changes: 0 additions & 9 deletions quantum/backlight/backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "backlight.h"
#include "eeprom.h"
#include "eeconfig.h"
#include "debug.h"

Expand Down Expand Up @@ -176,14 +175,6 @@ void backlight_level(uint8_t level) {
eeconfig_update_backlight(backlight_config.raw);
}

uint8_t eeconfig_read_backlight(void) {
return eeprom_read_byte(EECONFIG_BACKLIGHT);
}

void eeconfig_update_backlight(uint8_t val) {
eeprom_update_byte(EECONFIG_BACKLIGHT, val);
}

void eeconfig_update_backlight_current(void) {
eeconfig_update_backlight(backlight_config.raw);
}
Expand Down
Loading

0 comments on commit f78412d

Please sign in to comment.