diff options
author | Keith Packard <keithp@keithp.com> | 2011-01-06 17:34:58 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-01-06 17:34:58 -0800 |
commit | e4ba9bf4291bf17c777c8c3ef7c71e4a30b9947a (patch) | |
tree | 93aa37af44852d21ddc4c2924cf49b07bbf905e5 /src/ao.h | |
parent | ddcc94da4326f9ce954bd31a46b36165c58e6c18 (diff) |
altos: Require manual flight erasing.
This supports flash chips that require larger erase blocks.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao.h')
-rw-r--r-- | src/ao.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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,10 +999,15 @@ 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); /* |