DFU: update call to match library

This commit is contained in:
King Kévin 2018-10-29 12:30:23 +01:00
parent 5c976064b0
commit 4dbf6df59f
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ static void usb_dfu_flash(usbd_device *usbd_dev, struct usb_setup_data *req)
(void)usbd_dev; // variable not used
(void)req; // variable not used
led_off(); // indicate we are processing
if (0 != flash_internal_write(flash_pointer, download_data, download_length, true)) { // write downloaded data
if (flash_internal_write(flash_pointer, download_data, download_length, true) >= download_length) { // write downloaded data
flash_pointer += download_length; // go to next segment
usb_dfu_state = STATE_DFU_DNLOAD_IDLE; // go back to idle stat to wait for next segment
} else { // warn about writing error