mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-02-17 18:16:53 +00:00
Updated location of eeconfig magic numbers so non-EEPROM nvm drivers can use them too.
This commit is contained in:
parent
7847adcdf3
commit
57bcc8cbaf
@ -6,11 +6,6 @@
|
||||
#include <stddef.h> // offsetof
|
||||
#include "eeconfig.h"
|
||||
|
||||
#ifndef EECONFIG_MAGIC_NUMBER
|
||||
# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEE4 // When changing, decrement this value to avoid future re-init issues
|
||||
#endif
|
||||
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
|
||||
|
||||
// Dummy struct only used to calculate offsets
|
||||
typedef struct PACKED {
|
||||
uint16_t magic;
|
||||
|
@ -5,6 +5,11 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifndef EECONFIG_MAGIC_NUMBER
|
||||
# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEE3 // When changing, decrement this value to avoid future re-init issues
|
||||
#endif
|
||||
#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF
|
||||
|
||||
void nvm_eeconfig_erase(void);
|
||||
|
||||
bool nvm_eeconfig_is_enabled(void);
|
||||
|
@ -23,7 +23,7 @@ else
|
||||
OPT_DEFS += -DNVM_DRIVER_$(NVM_DRIVER_UPPER) -DNVM_DRIVER="$(NVM_DRIVER)"
|
||||
|
||||
ifneq ("$(wildcard $(QUANTUM_DIR)/nvm/$(NVM_DRIVER_LOWER))","")
|
||||
VPATH += $(QUANTUM_DIR)/nvm/$(NVM_DRIVER_LOWER)
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/nvm/$(NVM_DRIVER_LOWER)
|
||||
endif
|
||||
|
||||
QUANTUM_SRC += nvm_eeconfig.c
|
||||
|
Loading…
Reference in New Issue
Block a user