X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fao.h;h=f23e4134ac0e9713208ceed47968fc312cb6399d;hp=67337de78743a7249a52e02644477d4138fc0a1e;hb=e4ba9bf4291bf17c777c8c3ef7c71e4a30b9947a;hpb=ddcc94da4326f9ce954bd31a46b36165c58e6c18 diff --git a/src/ao.h b/src/ao.h index 67337de7..f23e4134 100644 --- a/src/ao.h +++ b/src/ao.h @@ -443,6 +443,8 @@ extern __xdata uint32_t ao_storage_block; /* Byte offset of config block. Will be ao_storage_block bytes long */ extern __xdata uint32_t ao_storage_config; +#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); @@ -459,6 +461,10 @@ ao_storage_write(uint32_t pos, __xdata void *buf, uint16_t len) __reentrant; uint8_t ao_storage_read(uint32_t pos, __xdata void *buf, uint16_t len) __reentrant; +/* Erase a block of storage. This always clears ao_storage_block bytes */ +uint8_t +ao_storage_erase(uint32_t pos); + /* Initialize the storage code */ void ao_storage_init(void); @@ -993,9 +999,14 @@ struct ao_config { extern __xdata struct ao_config ao_config; +#define AO_CONFIG_MAX_SIZE 128 + void ao_config_get(void); +void +ao_config_put(void); + void ao_config_init(void);