[MERGE] Non-Volatile memory data repository pattern (24356)
Some checks failed
Unit Tests / test (push) Has been cancelled
Some checks failed
Unit Tests / test (push) Has been cancelled
This commit is contained in:
parent
4a138dd93c
commit
20033594ef
82 changed files with 1478 additions and 838 deletions
22
quantum/nvm/eeprom/nvm_eeprom_via_internal.h
Normal file
22
quantum/nvm/eeprom/nvm_eeprom_via_internal.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2024 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
// Keyboard level code can change where VIA stores the magic.
|
||||
// The magic is the build date YYMMDD encoded as BCD in 3 bytes,
|
||||
// thus installing firmware built on a different date to the one
|
||||
// already installed can be detected and the EEPROM data is reset.
|
||||
// The only reason this is important is in case EEPROM usage changes
|
||||
// and the EEPROM was not explicitly reset by bootmagic lite.
|
||||
#ifndef VIA_EEPROM_MAGIC_ADDR
|
||||
# define VIA_EEPROM_MAGIC_ADDR (EECONFIG_SIZE)
|
||||
#endif
|
||||
|
||||
#define VIA_EEPROM_LAYOUT_OPTIONS_ADDR (VIA_EEPROM_MAGIC_ADDR + 3)
|
||||
|
||||
// The end of the EEPROM memory used by VIA
|
||||
// By default, dynamic keymaps will start at this if there is no
|
||||
// custom config
|
||||
#define VIA_EEPROM_CUSTOM_CONFIG_ADDR (VIA_EEPROM_LAYOUT_OPTIONS_ADDR + VIA_EEPROM_LAYOUT_OPTIONS_SIZE)
|
||||
|
||||
#define VIA_EEPROM_CONFIG_END (VIA_EEPROM_CUSTOM_CONFIG_ADDR + VIA_EEPROM_CUSTOM_CONFIG_SIZE)
|
Loading…
Add table
Add a link
Reference in a new issue