diff options
Diffstat (limited to 'src/ao_flash.c')
| -rw-r--r-- | src/ao_flash.c | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/src/ao_flash.c b/src/ao_flash.c index 3a06bae1..bc8b56ad 100644 --- a/src/ao_flash.c +++ b/src/ao_flash.c @@ -322,6 +322,18 @@ ao_storage_flush(void) __reentrant  	} ao_mutex_put(&ao_flash_mutex);  } +uint8_t +ao_storage_erase(uint32_t pos) __reentrant +{ +	ao_mutex_get(&ao_flash_mutex); { +		uint16_t block = (uint16_t) (pos >> ao_flash_block_shift); +		ao_flash_fill(block); +		memset(ao_flash_data, 0xff, ao_flash_block_size); +		ao_flash_block_dirty = 1; +	} ao_mutex_put(&ao_flash_mutex); +	return 1; +} +  static void  flash_dump(void) __reentrant  { | 
