mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-25 14:50:57 +00:00
flash: flash_init returns bool
This commit is contained in:
parent
353883e0f3
commit
c2ec40bebf
@ -41,6 +41,11 @@ const uint32_t FLASH_SECTOR_TABLE[FLASH_SECTOR_COUNT + 1] = {
|
|||||||
[24] = 0x08200000, // last element - not a valid sector
|
[24] = 0x08200000, // last element - not a valid sector
|
||||||
};
|
};
|
||||||
|
|
||||||
|
secbool flash_init(void)
|
||||||
|
{
|
||||||
|
return sectrue;
|
||||||
|
}
|
||||||
|
|
||||||
secbool flash_unlock(void)
|
secbool flash_unlock(void)
|
||||||
{
|
{
|
||||||
HAL_FLASH_Unlock();
|
HAL_FLASH_Unlock();
|
||||||
|
@ -45,6 +45,10 @@
|
|||||||
|
|
||||||
extern const uint32_t FLASH_SECTOR_TABLE[FLASH_SECTOR_COUNT + 1];
|
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_unlock(void);
|
||||||
secbool flash_lock(void);
|
secbool flash_lock(void);
|
||||||
|
|
||||||
|
@ -64,11 +64,11 @@ static void flash_read(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int flash_init(void)
|
bool flash_init(void)
|
||||||
{
|
{
|
||||||
memset(flash_buffer, 0xFF, sizeof(flash_buffer));
|
memset(flash_buffer, 0xFF, sizeof(flash_buffer));
|
||||||
flash_read();
|
flash_read();
|
||||||
return 0;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void flash_set_option_bytes(void)
|
void flash_set_option_bytes(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user