summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXelus22 <17491233+Xelus22@users.noreply.github.com>2020-09-16 16:16:01 +1000
committerDrashna Jael're <drashna@live.com>2020-09-30 03:52:40 -0700
commit99951c11d785125975c628ed14a1a38a5169a841 (patch)
treea02b987765297639b40fd130b4700704e484a86b
parentedbb2c508216396a5d8a9100b0d58b1d2068aee8 (diff)
[Core] DYNAMIC_KEYMAP_EEPROM_MAX_ADDR check (#10315)
* add error check * remove quotes * update error message Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--quantum/dynamic_keymap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c
index 9b86738c64..688379c9af 100644
--- a/quantum/dynamic_keymap.c
+++ b/quantum/dynamic_keymap.c
@@ -41,6 +41,11 @@
# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 1023
#endif
+// Due to usage of uint16_t check for max 65535
+#if DYNAMIC_KEYMAP_EEPROM_MAX_ADDR > 65535
+# error DYNAMIC_KEYMAP_EEPROM_MAX_ADDR must be less than 65536
+#endif
+
// 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