<p>Kévin Redon has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/12514">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">enable flashing by providing real downloaded data length<br><br>Change-Id: I6f16170a4b41a70d89954e2c4a841efc67a26786<br>---<br>M usb/class/dfu/device/dfudf.c<br>1 file changed, 1 insertion(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-asf4-dfu refs/changes/14/12514/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/usb/class/dfu/device/dfudf.c b/usb/class/dfu/device/dfudf.c</span><br><span>index aefcab4..41e235b 100644</span><br><span>--- a/usb/class/dfu/device/dfudf.c</span><br><span>+++ b/usb/class/dfu/device/dfudf.c</span><br><span>@@ -245,11 +245,9 @@</span><br><span>            } else { // there is data to be flash</span><br><span>                        if (USB_SETUP_STAGE == stage) { // there will be data to be flash</span><br><span>                            to_return = usbdc_xfer(ep, dfu_download_data, req->wLength, false); // send ack to the setup request to get the data</span><br><span style="color: hsl(0, 100%, 40%);">-                         //to_return = usbdc_xfer(ep, NULL, 0, false); // send ACK</span><br><span>                    } else { // now there is data to be flashed</span><br><span>                          dfu_download_progress = req->wValue * sizeof(dfu_download_data); // remember which block to flash</span><br><span style="color: hsl(0, 100%, 40%);">-                            dfu_download_length = 0;</span><br><span style="color: hsl(0, 100%, 40%);">-                                //dfu_download_length = req->wLength; // remember the data size to be flash</span><br><span style="color: hsl(120, 100%, 40%);">+                                dfu_download_length = req->wLength; // remember the data size to be flash</span><br><span>                                 dfu_state = USB_DFU_STATE_DFU_DNLOAD_SYNC; // go to sync state</span><br><span>                               to_return = usbdc_xfer(ep, NULL, 0, false); // ACK the data</span><br><span>                          // we let the main application flash the data because this can be long and would stall the USB ISR</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12514">change 12514</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12514"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-asf4-dfu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I6f16170a4b41a70d89954e2c4a841efc67a26786 </div>
<div style="display:none"> Gerrit-Change-Number: 12514 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kévin Redon <kredon@sysmocom.de> </div>