X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=inline;f=src%2Fkernel%2Fao_storage.h;h=ff8548eb150d71bb73a92ddf4457e7079a7a760f;hb=HEAD;hp=1c5867e09eed3e9dc78f79a9a00490d488c3d9a4;hpb=936eceded2d08f4eb7318b28bd1be6cd3b06a7b3;p=fw%2Faltos diff --git a/src/kernel/ao_storage.h b/src/kernel/ao_storage.h index 1c5867e0..ff8548eb 100644 --- a/src/kernel/ao_storage.h +++ b/src/kernel/ao_storage.h @@ -31,15 +31,23 @@ typedef ao_storage_pos_t ao_pos_t; /* Total bytes of available storage */ +#ifndef ao_storage_total extern ao_pos_t ao_storage_total; +#endif /* Block size - device is erased in these units. At least 256 bytes */ +#ifndef ao_storage_block extern ao_pos_t ao_storage_block; +#endif #ifndef USE_STORAGE_CONFIG #define USE_STORAGE_CONFIG 1 #endif +#ifndef AO_STORAGE_ERASED_BYTE +#define AO_STORAGE_ERASED_BYTE 0xff +#endif + #if USE_STORAGE_CONFIG /* Byte offset of config block. Will be ao_storage_block bytes long */ extern ao_pos_t ao_storage_config; @@ -50,7 +58,9 @@ extern ao_pos_t ao_storage_config; #endif /* Storage unit size - device reads and writes must be within blocks of this size. Usually 256 bytes. */ +#ifndef ao_storage_unit extern uint16_t ao_storage_unit; +#endif /* Initialize above values. Can only be called once the OS is running */ void