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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user