1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-30 03:18:20 +00:00

commit emulator flash modification to persistent storage (#390)

This commit is contained in:
heneault 2018-08-02 08:59:46 -04:00 committed by Pavol Rusnak
parent 925c3a8536
commit dca28f1c44

View File

@ -20,10 +20,14 @@
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include <stdbool.h> #include <stdbool.h>
#include <unistd.h>
#include "memory.h" #include "memory.h"
void flash_lock(void) {} void flash_lock(void) {
sync();
}
void flash_unlock(void) {} void flash_unlock(void) {}
void flash_clear_status_flags(void) {} void flash_clear_status_flags(void) {}
@ -131,5 +135,6 @@ void svc_flash_erase_sector(uint16_t sector) {
uint32_t svc_flash_lock(void) { uint32_t svc_flash_lock(void) {
assert (!flash_locked); assert (!flash_locked);
flash_locked = true; flash_locked = true;
sync();
return 0; return 0;
} }