Allow for disabling EEPROM subsystem entirely. (#25173)

This commit is contained in:
Nick Brassel 2025-04-20 05:20:00 +10:00 committed by GitHub
parent ea85ace4a9
commit 5c39722ab9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 75 additions and 84 deletions

View File

@ -171,9 +171,10 @@ endif
VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi wear_leveling legacy_stm32_flash
EEPROM_DRIVER ?= vendor
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
ifneq ($(strip $(EEPROM_DRIVER)),none)
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid EEPROM_DRIVER,EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
else
else
OPT_DEFS += -DEEPROM_ENABLE
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom
COMMON_VPATH += $(DRIVER_PATH)/eeprom
@ -247,6 +248,7 @@ else
SRC += eeprom.c
endif
endif
endif
endif
VALID_WEAR_LEVELING_DRIVER_TYPES := custom embedded_flash spi_flash rp2040_flash legacy

View File

@ -319,7 +319,7 @@
"properties": {
"driver": {
"type": "string",
"enum": ["custom", "embedded_flash", "legacy", "rp2040_flash", "spi_flash"]
"enum": ["none", "custom", "embedded_flash", "legacy", "rp2040_flash", "spi_flash"]
},
"backing_size": {"$ref": "qmk.definitions.v1#/unsigned_int"},
"logical_size": {"$ref": "qmk.definitions.v1#/unsigned_int"}

View File

@ -18,8 +18,6 @@
#include "dynamic_keymap.h"
#include "keymap_introspection.h"
#include "action.h"
#include "eeprom.h"
#include "progmem.h"
#include "send_string.h"
#include "keycodes.h"
#include "nvm_dynamic_keymap.h"

View File

@ -2,16 +2,11 @@
#include <stdint.h>
#include <stdbool.h>
#include "debug.h"
#include "eeprom.h"
#include "eeconfig.h"
#include "action_layer.h"
#include "nvm_eeconfig.h"
#include "keycode_config.h"
#ifdef EEPROM_DRIVER
# include "eeprom_driver.h"
#endif // EEPROM_DRIVER
#ifdef BACKLIGHT_ENABLE
# include "backlight.h"
#endif // BACKLIGHT_ENABLE

View File

@ -19,7 +19,6 @@
#include "led_matrix.h"
#include "progmem.h"
#include "eeprom.h"
#include "eeconfig.h"
#include "keyboard.h"
#include "sync_timer.h"

View File

@ -18,7 +18,6 @@
#include "rgb_matrix.h"
#include "progmem.h"
#include "eeprom.h"
#include "eeconfig.h"
#include "keyboard.h"
#include "sync_timer.h"

View File

@ -16,7 +16,6 @@
#include "unicode.h"
#include "eeprom.h"
#include "eeconfig.h"
#include "action.h"
#include "action_util.h"

View File

@ -26,7 +26,6 @@
#include "raw_hid.h"
#include "dynamic_keymap.h"
#include "eeprom.h"
#include "eeconfig.h"
#include "matrix.h"
#include "timer.h"