target_flash: enter_flash_mode return type fix

This commit is contained in:
Rafael Silva 2022-08-25 15:06:33 +01:00 committed by Rachel Mant
parent 8b03038b44
commit 6cafdeaa73
2 changed files with 4 additions and 4 deletions

View File

@ -363,14 +363,14 @@ static uint32_t renesas_flash_size(const uint8_t *pnr)
} }
} }
static int renesas_enter_flash_mode(target *t) static bool renesas_enter_flash_mode(target *t)
{ {
target_reset(t); target_reset(t);
/* permit flash operations */ /* permit flash operations */
target_mem_write8(t, SYSC_FWEPROR, SYSC_FWEPROR_PERMIT); target_mem_write8(t, SYSC_FWEPROR, SYSC_FWEPROR_PERMIT);
return 0; return true;
} }
typedef enum pe_mode { typedef enum pe_mode {

View File

@ -120,8 +120,8 @@ struct target_s {
bool (*mass_erase)(target *t); bool (*mass_erase)(target *t);
/* Flash functions */ /* Flash functions */
int (*enter_flash_mode)(target *t); bool (*enter_flash_mode)(target *t);
int (*exit_flash_mode)(target *t); bool (*exit_flash_mode)(target *t);
bool flash_mode; bool flash_mode;
/* target-defined options */ /* target-defined options */