X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fao_ee.c;h=575a7b30f19d1b591faea9525e1c663b6b8a5fa5;hp=6fe88252d9721ac92e87df68fe6e4ac725bee7a6;hb=e4ba9bf4291bf17c777c8c3ef7c71e4a30b9947a;hpb=ddcc94da4326f9ce954bd31a46b36165c58e6c18 diff --git a/src/ao_ee.c b/src/ao_ee.c index 6fe88252..575a7b30 100644 --- a/src/ao_ee.c +++ b/src/ao_ee.c @@ -246,6 +246,18 @@ ao_storage_flush(void) __reentrant } ao_mutex_put(&ao_ee_mutex); } +uint8_t +ao_storage_erase(uint32_t pos) __reentrant +{ + ao_mutex_get(&ao_ee_mutex); { + uint16_t block = (uint16_t) (pos >> 8); + ao_ee_fill(block); + memset(ao_ee_data, 0xff, EE_BLOCK_SIZE); + ao_ee_block_dirty = 1; + } ao_mutex_put(&ao_ee_mutex); + return 1; +} + static void ee_dump(void) __reentrant {