1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2025-04-21 12:27:27 +03:00

atusb/fw: introduced function flash_end_write to properly finish flashing

- dfu.h (flash_end_write), flash.c (flash_end_write): write any incomplete
  buffer
- flash.c (flash_write, flash_end_write): call boot_rww_enable only at the
  very end, it won't erase our buffer in mid-page
- usb/dfu.c (my_setup): call flash_end_write at the end of a download
This commit is contained in:
Werner Almesberger
2011-03-11 17:40:51 -03:00
parent 2978afe92b
commit c265151d2b
3 changed files with 10 additions and 0 deletions

View File

@@ -192,6 +192,7 @@ static int my_setup(const struct setup_request *setup)
}
if (!setup->wLength) {
debug("DONE\n");
flash_end_write();
dfu.state = dfuIDLE;
did_download = 1;
return 1;