DFU: update call to match library
This commit is contained in:
parent
5c976064b0
commit
4dbf6df59f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue