mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-27 04:10:25 +00:00
Merge pull request #4325 from JYouren/patch-1
Only write to the flash what was read from the file
This commit is contained in:
commit
f7f5fe1120
@ -54,7 +54,7 @@ async fn main(_s: Spawner) {
|
||||
for chunk in APP_B.chunks(4096) {
|
||||
buf.0[..chunk.len()].copy_from_slice(chunk);
|
||||
defmt::info!("writing block at offset {}", offset);
|
||||
writer.write(offset, &buf.0[..]).unwrap();
|
||||
writer.write(offset, &buf.0[..chunk.len()]).unwrap();
|
||||
offset += chunk.len() as u32;
|
||||
}
|
||||
watchdog.feed();
|
||||
|
Loading…
x
Reference in New Issue
Block a user