summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stm32/mboot/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/stm32/mboot/main.c b/ports/stm32/mboot/main.c
index 8cc14c2ac..ba0c35b8b 100644
--- a/ports/stm32/mboot/main.c
+++ b/ports/stm32/mboot/main.c
@@ -933,6 +933,9 @@ static int dfu_handle_tx(int cmd, int arg, int len, uint8_t *buf, int max_len) {
dfu_context.status = DFU_STATUS_OK;
dfu_context.error = 0;
return 6;
+ } else if (cmd == DFU_GETSTATE && len == 1) {
+ buf[0] = dfu_context.state; // bState
+ return 1;
}
return -1;
}