<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/12499">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Jenkins Builder: Verified
Harald Welte: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add documentation and fix timeout value<br><br>Change-Id: Ia1d6ef4e4a5c9929aefd149c4e3eaf2dfe37fea8<br>---<br>M usb/class/dfu/device/dfudf_desc.h<br>M usb/class/dfu/usb_protocol_dfu.h<br>2 files changed, 10 insertions(+), 10 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/usb/class/dfu/device/dfudf_desc.h b/usb/class/dfu/device/dfudf_desc.h</span><br><span>index f9eca38..5590e16 100644</span><br><span>--- a/usb/class/dfu/device/dfudf_desc.h</span><br><span>+++ b/usb/class/dfu/device/dfudf_desc.h</span><br><span>@@ -84,9 +84,9 @@</span><br><span> USB_DFU_PROTOCOL_DFU, \</span><br><span> CONF_USB_DFUD_IINTERFACE), \</span><br><span> USB_DFU_FUNC_DESC_BYTES(USB_DFU_ATTRIBUTES_CAN_DOWNLOAD | USB_DFU_ATTRIBUTES_WILL_DETACH, \</span><br><span style="color: hsl(0, 100%, 40%);">- 200, /* maximum time in milliseconds to detach (and reboot) */ \</span><br><span style="color: hsl(0, 100%, 40%);">- 1024, /* maximum transfer size */ \</span><br><span style="color: hsl(0, 100%, 40%);">- 0x0110 /*< DFU specification version 1.1 used */ )</span><br><span style="color: hsl(120, 100%, 40%);">+ 0, /**< detaching makes only sense in run-time mode */ \</span><br><span style="color: hsl(120, 100%, 40%);">+ 1024, /**< transfer size corresponds to page size for optimal flash writing */ \</span><br><span style="color: hsl(120, 100%, 40%);">+ 0x0110 /**< DFU specification version 1.1 used */ )</span><br><span> </span><br><span> #define DFUD_STR_DESCES \</span><br><span> CONF_USB_DFUD_LANGID_DESC \</span><br><span>diff --git a/usb/class/dfu/usb_protocol_dfu.h b/usb/class/dfu/usb_protocol_dfu.h</span><br><span>index 2e7323f..7f82743 100644</span><br><span>--- a/usb/class/dfu/usb_protocol_dfu.h</span><br><span>+++ b/usb/class/dfu/usb_protocol_dfu.h</span><br><span>@@ -79,15 +79,15 @@</span><br><span> </span><br><span> //! DFU Functional Descriptor</span><br><span> typedef struct usb_dfu_func_desc {</span><br><span style="color: hsl(0, 100%, 40%);">- uint8_t bFunctionLength;</span><br><span style="color: hsl(0, 100%, 40%);">- uint8_t bDescriptorType;</span><br><span style="color: hsl(0, 100%, 40%);">- uint8_t bmAttributes;</span><br><span style="color: hsl(0, 100%, 40%);">- le16_t wDetachTimeOut;</span><br><span style="color: hsl(0, 100%, 40%);">- le16_t wTransferSize;</span><br><span style="color: hsl(0, 100%, 40%);">- le16_t bcdDFUVersion;</span><br><span style="color: hsl(120, 100%, 40%);">+ uint8_t bFunctionLength; /**< Size of this descriptor, in bytes (always 9) */</span><br><span style="color: hsl(120, 100%, 40%);">+ uint8_t bDescriptorType; /**< DFU FUNCTIONAL descriptor type (always 0x21) */</span><br><span style="color: hsl(120, 100%, 40%);">+ uint8_t bmAttributes; /**< DFU attributes bit mask */</span><br><span style="color: hsl(120, 100%, 40%);">+ le16_t wDetachTimeOut; /**< Time, in milliseconds, that the device will wait after receipt of the DFU_DETACH request */</span><br><span style="color: hsl(120, 100%, 40%);">+ le16_t wTransferSize; /**< Maximum number of bytes that the device can accept per control-write transaction */</span><br><span style="color: hsl(120, 100%, 40%);">+ le16_t bcdDFUVersion; /**< Numeric expression identifying the version of the DFU Specification release */</span><br><span> } usb_dfu_func_desc_t;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define USB_DFU_FUNC_DESC_LEN 0x09</span><br><span style="color: hsl(120, 100%, 40%);">+#define USB_DFU_FUNC_DESC_LEN 9</span><br><span> #define USB_DFU_FUNC_DESC_TYPE 0x21</span><br><span> #define USB_DFU_FUNC_DESC_BYTES(bmAttributes, wDetachTimeOut, wTransferSize, bcdDFUVersion) \</span><br><span> USB_DFU_FUNC_DESC_LEN, /* bFunctionLength */ \</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12499">change 12499</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/12499"/><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: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ia1d6ef4e4a5c9929aefd149c4e3eaf2dfe37fea8 </div>
<div style="display:none"> Gerrit-Change-Number: 12499 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Kévin Redon <kredon@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>