Skip to content

Commit e01b1c8

Browse files
ahasztagtomchy
authored andcommitted
samples: dfu_target: Add success log for write operations
Add log message when DFU target write operation completes successfully. This helps with testing, as it allows to avoid situations where a new command is written before the old write has finished. Signed-off-by: Artur Hadasz <[email protected]>
1 parent f78554b commit e01b1c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

samples/dfu/dfu_target/src/dfu_target_shell.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ static int cmd_dfu_target_write(const struct shell *shell, size_t argc, char **a
142142
if (ret < 0) {
143143
shell_error(shell, "DFU target write failed: %d", ret);
144144
return ret;
145+
} else {
146+
shell_print(shell, "Successfully wrote %d bytes at offset %d", chunk_size,
147+
offset);
145148
}
146149

147150
return 0;

0 commit comments

Comments
 (0)