Commit 1296a01f authored by Damien George's avatar Damien George

stm32/mboot: Move remaining led_state_all call into mboot_state_change.

This was missed in b2deea67Signed-off-by: default avatarDamien George <damien@micropython.org>
parent 54f1694a
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment