nvm_eeprom_via_internal.h (970B)
1 // Copyright 2024 Nick Brassel (@tzarc) 2 // SPDX-License-Identifier: GPL-2.0-or-later 3 #pragma once 4 5 // Keyboard level code can change where VIA stores the magic. 6 // The magic is the build date YYMMDD encoded as BCD in 3 bytes, 7 // thus installing firmware built on a different date to the one 8 // already installed can be detected and the EEPROM data is reset. 9 // The only reason this is important is in case EEPROM usage changes 10 // and the EEPROM was not explicitly reset by bootmagic lite. 11 #ifndef VIA_EEPROM_MAGIC_ADDR 12 # define VIA_EEPROM_MAGIC_ADDR (EECONFIG_SIZE) 13 #endif 14 15 #define VIA_EEPROM_LAYOUT_OPTIONS_ADDR (VIA_EEPROM_MAGIC_ADDR + 3) 16 17 // The end of the EEPROM memory used by VIA 18 // By default, dynamic keymaps will start at this if there is no 19 // custom config 20 #define VIA_EEPROM_CUSTOM_CONFIG_ADDR (VIA_EEPROM_LAYOUT_OPTIONS_ADDR + VIA_EEPROM_LAYOUT_OPTIONS_SIZE) 21 22 #define VIA_EEPROM_CONFIG_END (VIA_EEPROM_CUSTOM_CONFIG_ADDR + VIA_EEPROM_CUSTOM_CONFIG_SIZE)