1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

flash: flash_init returns bool

This commit is contained in:
Jan Pochyla 2017-10-24 13:54:21 +02:00
parent 353883e0f3
commit c2ec40bebf
3 changed files with 11 additions and 2 deletions

View File

@ -41,6 +41,11 @@ const uint32_t FLASH_SECTOR_TABLE[FLASH_SECTOR_COUNT + 1] = {
[24] = 0x08200000, // last element - not a valid sector
};
secbool flash_init(void)
{
return sectrue;
}
secbool flash_unlock(void)
{
HAL_FLASH_Unlock();

View File

@ -45,6 +45,10 @@
extern const uint32_t FLASH_SECTOR_TABLE[FLASH_SECTOR_COUNT + 1];
secbool flash_init(void);
void flash_set_option_bytes(void);
secbool flash_unlock(void);
secbool flash_lock(void);

View File

@ -64,11 +64,11 @@ static void flash_read(void)
}
}
int flash_init(void)
bool flash_init(void)
{
memset(flash_buffer, 0xFF, sizeof(flash_buffer));
flash_read();
return 0;
return true;
}
void flash_set_option_bytes(void)