logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

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. // Keyboard level code can change where VIA stores the magic.
  5. // The magic is the build date YYMMDD encoded as BCD in 3 bytes,
  6. // thus installing firmware built on a different date to the one
  7. // already installed can be detected and the EEPROM data is reset.
  8. // The only reason this is important is in case EEPROM usage changes
  9. // and the EEPROM was not explicitly reset by bootmagic lite.
  10. #ifndef VIA_EEPROM_MAGIC_ADDR
  11. # define VIA_EEPROM_MAGIC_ADDR (EECONFIG_SIZE)
  12. #endif
  13. #define VIA_EEPROM_LAYOUT_OPTIONS_ADDR (VIA_EEPROM_MAGIC_ADDR + 3)
  14. // The end of the EEPROM memory used by VIA
  15. // By default, dynamic keymaps will start at this if there is no
  16. // custom config
  17. #define VIA_EEPROM_CUSTOM_CONFIG_ADDR (VIA_EEPROM_LAYOUT_OPTIONS_ADDR + VIA_EEPROM_LAYOUT_OPTIONS_SIZE)
  18. #define VIA_EEPROM_CONFIG_END (VIA_EEPROM_CUSTOM_CONFIG_ADDR + VIA_EEPROM_CUSTOM_CONFIG_SIZE)