mirror of
https://github.com/firewalkwithm3/qmk_firmware.git
synced 2024-11-22 11:30:30 +08:00
Allow dynamic keymap to compile without via.h (#17703)
This commit is contained in:
parent
32cc8a7f43
commit
42eff8c372
|
@ -19,7 +19,13 @@
|
||||||
#include "progmem.h" // to read default from flash
|
#include "progmem.h" // to read default from flash
|
||||||
#include "quantum.h" // for send_string()
|
#include "quantum.h" // for send_string()
|
||||||
#include "dynamic_keymap.h"
|
#include "dynamic_keymap.h"
|
||||||
#include "via.h" // for default VIA_EEPROM_ADDR_END
|
|
||||||
|
#ifdef VIA_ENABLE
|
||||||
|
# include "via.h" // for VIA_EEPROM_CONFIG_END
|
||||||
|
# define DYNAMIC_KEYMAP_EEPROM_START (VIA_EEPROM_CONFIG_END)
|
||||||
|
#else
|
||||||
|
# define DYNAMIC_KEYMAP_EEPROM_START (EECONFIG_SIZE)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENCODER_ENABLE
|
#ifdef ENCODER_ENABLE
|
||||||
# include "encoder.h"
|
# include "encoder.h"
|
||||||
|
@ -55,13 +61,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If DYNAMIC_KEYMAP_EEPROM_ADDR not explicitly defined in config.h,
|
// 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
|
#ifndef DYNAMIC_KEYMAP_EEPROM_ADDR
|
||||||
# ifdef VIA_EEPROM_CUSTOM_CONFIG_ADDR
|
# define DYNAMIC_KEYMAP_EEPROM_ADDR DYNAMIC_KEYMAP_EEPROM_START
|
||||||
# define DYNAMIC_KEYMAP_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR + VIA_EEPROM_CUSTOM_CONFIG_SIZE)
|
|
||||||
# else
|
|
||||||
# error DYNAMIC_KEYMAP_EEPROM_ADDR not defined
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Dynamic encoders starts after dynamic keymaps
|
// Dynamic encoders starts after dynamic keymaps
|
||||||
|
|
|
@ -54,6 +54,8 @@
|
||||||
# define VIA_EEPROM_CUSTOM_CONFIG_SIZE 0
|
# define VIA_EEPROM_CUSTOM_CONFIG_SIZE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define VIA_EEPROM_CONFIG_END (VIA_EEPROM_CUSTOM_CONFIG_ADDR + VIA_EEPROM_CUSTOM_CONFIG_SIZE)
|
||||||
|
|
||||||
// This is changed only when the command IDs change,
|
// This is changed only when the command IDs change,
|
||||||
// so VIA Configurator can detect compatible firmware.
|
// so VIA Configurator can detect compatible firmware.
|
||||||
#define VIA_PROTOCOL_VERSION 0x0009
|
#define VIA_PROTOCOL_VERSION 0x0009
|
||||||
|
|
Loading…
Reference in a new issue