Make Dynamic Keymaps more friendly for non-VIA implementations
This commit is contained in:
committed by
Florian Didron
parent
1bd151eee3
commit
259cc07202
@@ -14,13 +14,16 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "keymap.h" // to get keymaps[][][]
|
||||
#include "tmk_core/common/eeprom.h"
|
||||
#include "eeprom.h"
|
||||
#include "progmem.h" // to read default from flash
|
||||
#include "quantum.h" // for send_string()
|
||||
#include "dynamic_keymap.h"
|
||||
#ifdef VIA_ENABLE
|
||||
# include "via.h" // for default VIA_EEPROM_ADDR_END
|
||||
#else
|
||||
# include "eeconfig.h"
|
||||
#endif
|
||||
|
||||
#ifndef DYNAMIC_KEYMAP_LAYER_COUNT
|
||||
# define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||
@@ -33,11 +36,15 @@
|
||||
// If DYNAMIC_KEYMAP_EEPROM_ADDR not explicitly defined in config.h,
|
||||
// default it start after VIA_EEPROM_CUSTOM_ADDR+VIA_EEPROM_CUSTOM_SIZE
|
||||
#ifndef DYNAMIC_KEYMAP_EEPROM_ADDR
|
||||
# ifdef VIA_ENABLE
|
||||
# ifdef VIA_EEPROM_CUSTOM_CONFIG_ADDR
|
||||
# define DYNAMIC_KEYMAP_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR + VIA_EEPROM_CUSTOM_CONFIG_SIZE)
|
||||
# else
|
||||
# error DYNAMIC_KEYMAP_EEPROM_ADDR not defined
|
||||
# endif
|
||||
# else
|
||||
# define DYNAMIC_KEYMAP_EEPROM_ADDR EECONFIG_SIZE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Dynamic macro starts after dynamic keymaps
|
||||
|
||||
Reference in New Issue
Block a user