summaryrefslogtreecommitdiff
path: root/include/environment.h
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-03-06 14:23:06 +0000
committerwdenk <wdenk>2003-03-06 14:23:06 +0000
commit500545cc6b83958209128bffa825b3c842a21a4e (patch)
tree10c2bfdfb0bddd973b38e4bea98c638e5d1e04bc /include/environment.h
parent47cd00fa707af9de76408b69d3e911717dbbfab1 (diff)
Fix problem with default #definesLABEL_2003_03_06_1440
Cleanup compiler warning
Diffstat (limited to 'include/environment.h')
-rw-r--r--include/environment.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/environment.h b/include/environment.h
index fe8465b9606..bb109649f6b 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -47,8 +47,15 @@
# if !defined(CFG_ENV_ADDR_REDUND) && defined(CFG_ENV_OFFSET_REDUND)
# define CFG_ENV_ADDR_REDUND (CFG_FLASH_BASE + CFG_ENV_OFFSET_REDUND)
# endif
-# ifndef CFG_ENV_SIZE
-# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
+# if defined(CFG_ENV_SECT_SIZE) || defined(CFG_ENV_SIZE)
+# ifndef CFG_ENV_SECT_SIZE
+# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE
+# endif
+# ifndef CFG_ENV_SIZE
+# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
+# endif
+# else
+# error "Both CFG_ENV_SECT_SIZE and CFG_ENV_SIZE undefined"
# endif
# if defined(CFG_ENV_ADDR_REDUND) && !defined(CFG_ENV_SIZE_REDUND)
# define CFG_ENV_SIZE_REDUND CFG_ENV_SIZE