summaryrefslogtreecommitdiff
path: root/src/core/ao_storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/ao_storage.h')
-rw-r--r--src/core/ao_storage.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/ao_storage.h b/src/core/ao_storage.h
index ea946399..6cc6fcb7 100644
--- a/src/core/ao_storage.h
+++ b/src/core/ao_storage.h
@@ -35,14 +35,22 @@ extern __pdata ao_pos_t ao_storage_total;
/* Block size - device is erased in these units. At least 256 bytes */
extern __pdata ao_pos_t ao_storage_block;
+#ifndef USE_STORAGE_CONFIG
+#define USE_STORAGE_CONFIG 1
+#endif
+
+#if USE_STORAGE_CONFIG
/* Byte offset of config block. Will be ao_storage_block bytes long */
extern __pdata ao_pos_t ao_storage_config;
+#define ao_storage_log_max ao_storage_config
+#else
+#define ao_storage_log_max ao_storage_total
+#endif
+
/* Storage unit size - device reads and writes must be within blocks of this size. Usually 256 bytes. */
extern __pdata uint16_t ao_storage_unit;
-#define AO_STORAGE_ERASE_LOG (ao_storage_config + AO_CONFIG_MAX_SIZE)
-
/* Initialize above values. Can only be called once the OS is running */
void
ao_storage_setup(void) __reentrant;