X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao_storage.h;h=6cc6fcb70797bfa5dbc66fed6979925e58d44c50;hb=bf893a4149b05b97f18f9f487af805adef859d74;hp=ea94639980c0574105a280844f948c394780e538;hpb=4de789331098abc24abcb9390a35aef889a41784;p=fw%2Faltos 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;