mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-17 05:03:07 +00:00
fix(legacy): update sector argument to match flash_erase_sector size
This commit is contained in:
parent
9261f2ffce
commit
810b34f579
@ -122,7 +122,7 @@ void svc_flash_program(uint32_t size) {
|
||||
(void)size;
|
||||
assert(!flash_locked);
|
||||
}
|
||||
void svc_flash_erase_sector(uint16_t sector) {
|
||||
void svc_flash_erase_sector(uint8_t sector) {
|
||||
assert(!flash_locked);
|
||||
assert(sector >= FLASH_STORAGE_SECTOR_FIRST &&
|
||||
sector <= FLASH_STORAGE_SECTOR_LAST);
|
||||
|
@ -45,7 +45,7 @@ static void svhandler_flash_program(uint32_t psize) {
|
||||
FLASH_CR |= FLASH_CR_PG;
|
||||
}
|
||||
|
||||
static void svhandler_flash_erase_sector(uint16_t sector) {
|
||||
static void svhandler_flash_erase_sector(uint8_t sector) {
|
||||
/* we only allow erasing storage sectors 2 and 3. */
|
||||
if (sector < FLASH_STORAGE_SECTOR_FIRST ||
|
||||
sector > FLASH_STORAGE_SECTOR_LAST) {
|
||||
|
@ -87,7 +87,7 @@ inline void svc_reboot_to_bootloader(void) {
|
||||
|
||||
extern void svc_flash_unlock(void);
|
||||
extern void svc_flash_program(uint32_t program_size);
|
||||
extern void svc_flash_erase_sector(uint16_t sector);
|
||||
extern void svc_flash_erase_sector(uint8_t sector);
|
||||
extern uint32_t svc_flash_lock(void);
|
||||
extern uint32_t svc_timer_ms(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user