aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-eeprom.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/fsm-eeprom.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/spaghetti-monster/fsm-eeprom.h b/spaghetti-monster/fsm-eeprom.h
index 3d34f23..c35c822 100644
--- a/spaghetti-monster/fsm-eeprom.h
+++ b/spaghetti-monster/fsm-eeprom.h
@@ -33,6 +33,9 @@
#endif
#if EEPROM_BYTES > 0
+#if EEPROM_BYTES >= (EEPSIZE/2)
+#error Requested EEPROM_BYTES too big.
+#endif
uint8_t eeprom[EEPROM_BYTES];
uint8_t load_eeprom(); // returns 1 for success, 0 for no data found
void save_eeprom();
@@ -40,6 +43,9 @@ void save_eeprom();
#endif
#if EEPROM_WL_BYTES > 0
+#if EEPROM_WL_BYTES >= (EEPSIZE/4)
+#error Requested EEPROM_WL_BYTES too big.
+#endif
uint8_t eeprom_wl[EEPROM_WL_BYTES];
uint8_t load_wl_eeprom(); // returns 1 for success, 0 for no data found
void save_wl_eeprom();