From ded4fb9e9864565c2f094017bc34175c4f2adcfe Mon Sep 17 00:00:00 2001 From: Xelus22 Date: Tue, 15 Sep 2020 01:16:36 +1000 Subject: [PATCH 1/3] add error check --- quantum/dynamic_keymap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 27ee6a284055..2f793cef9e61 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -42,6 +42,11 @@ # endif #endif +// Due to usage of uint16_t check for max 65535 +#if DYNAMIC_KEYMAP_EEPROM_MAX_ADDR > 65535 + #error "DYNAMIC_KEYMAP_EEPROM_MAX_ADDR is greater than 65535" +#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 From 3fa232405c3016dbbaefbcd064a1ad4558d0c0fd Mon Sep 17 00:00:00 2001 From: Xelus22 Date: Tue, 15 Sep 2020 01:25:56 +1000 Subject: [PATCH 2/3] remove quotes --- quantum/dynamic_keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 2f793cef9e61..9cab0eebda58 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -44,7 +44,7 @@ // Due to usage of uint16_t check for max 65535 #if DYNAMIC_KEYMAP_EEPROM_MAX_ADDR > 65535 - #error "DYNAMIC_KEYMAP_EEPROM_MAX_ADDR is greater than 65535" + #error DYNAMIC_KEYMAP_EEPROM_MAX_ADDR is greater than 65535 #endif // If DYNAMIC_KEYMAP_EEPROM_ADDR not explicitly defined in config.h, From 46ec6c1ebdf4920e6830ec41444abb345d05b228 Mon Sep 17 00:00:00 2001 From: Xelus22 <17491233+Xelus22@users.noreply.github.com> Date: Tue, 15 Sep 2020 10:35:52 +1000 Subject: [PATCH 3/3] update error message Co-authored-by: Ryan --- quantum/dynamic_keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 9cab0eebda58..0608b469c088 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -44,7 +44,7 @@ // Due to usage of uint16_t check for max 65535 #if DYNAMIC_KEYMAP_EEPROM_MAX_ADDR > 65535 - #error DYNAMIC_KEYMAP_EEPROM_MAX_ADDR is greater than 65535 +# error DYNAMIC_KEYMAP_EEPROM_MAX_ADDR must be less than 65536 #endif // If DYNAMIC_KEYMAP_EEPROM_ADDR not explicitly defined in config.h,