diff options
author | Damien <damien.p.george@gmail.com> | 2013-10-19 14:40:54 +0100 |
---|---|---|
committer | Damien <damien.p.george@gmail.com> | 2013-10-19 14:40:54 +0100 |
commit | 00ff04fc4932fc7c3fc2f9b9074f11c189045dad (patch) | |
tree | dcd6d14ed9ea2874f5c675aa877e5dd4982398bd /stm/storage.c | |
parent | 995b8aabb1ee786a4070d6d8392750ff878d53fa (diff) | |
download | micropython-00ff04fc4932fc7c3fc2f9b9074f11c189045dad.tar.gz micropython-00ff04fc4932fc7c3fc2f9b9074f11c189045dad.zip |
Working SysTick, code factoring, some boot-up code.
Diffstat (limited to 'stm/storage.c')
-rw-r--r-- | stm/storage.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/stm/storage.c b/stm/storage.c index 56ade79773..89dbd97c6a 100644 --- a/stm/storage.c +++ b/stm/storage.c @@ -46,9 +46,11 @@ static uint8_t *cache_get_addr_for_write(uint32_t flash_addr) { } void storage_init() { - cache_flash_sector_id = 0; - cache_dirty = false; - is_initialised = true; + if (!is_initialised) { + cache_flash_sector_id = 0; + cache_dirty = false; + is_initialised = true; + } } void storage_flush() { |