stm32/mboot: Move remaining led_state_all call into mboot_state_change.
This was missed in b2deea6762
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
54f1694ab6
commit
1296a01f4c
@ -198,7 +198,7 @@ static int fsload_program_file(bool write_to_flash) {
|
||||
static int fsload_validate_and_program_file(void *stream, const stream_methods_t *meth, const char *fname) {
|
||||
// First pass verifies the file, second pass programs it
|
||||
for (unsigned int pass = 0; pass <= 1; ++pass) {
|
||||
led_state_all(pass == 0 ? 2 : 4);
|
||||
mboot_state_change(MBOOT_STATE_FSLOAD_PASS_START, pass);
|
||||
int res = meth->open(stream, fname);
|
||||
if (res == 0) {
|
||||
res = input_stream_init(stream, meth->read);
|
||||
|
@ -64,6 +64,7 @@ typedef enum {
|
||||
MBOOT_STATE_DFU_END, // arg: unused
|
||||
MBOOT_STATE_FSLOAD_START, // arg: unused
|
||||
MBOOT_STATE_FSLOAD_END, // arg: result of fsload operation
|
||||
MBOOT_STATE_FSLOAD_PASS_START, // arg: pass number, 0 or 1 (verify and write respectively)
|
||||
MBOOT_STATE_FSLOAD_PROGRESS, // arg: total bytes processed so far, high bit set when doing write pass
|
||||
MBOOT_STATE_ERASE_START, // arg: address of erase
|
||||
MBOOT_STATE_ERASE_END, // arg: result of erase
|
||||
|
@ -228,6 +228,10 @@ void mboot_state_change(mboot_state_t state, uint32_t arg) {
|
||||
}
|
||||
break;
|
||||
|
||||
case MBOOT_STATE_FSLOAD_PASS_START:
|
||||
led_state_all(arg == 0 ? 2 : 4);
|
||||
break;
|
||||
|
||||
case MBOOT_STATE_FSLOAD_PROGRESS:
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user