aboutsummaryrefslogtreecommitdiffstats
path: root/usb/class/dfu/usb_protocol_dfu.h
diff options
context:
space:
mode:
authorKévin Redon <kredon@sysmocom.de>2018-12-18 13:27:53 +0100
committerKévin Redon <kredon@sysmocom.de>2019-01-16 18:40:31 +0100
commitc976a85af440ff2f1b4d274964870c0dadbf5198 (patch)
treed7a1076c0325986b94dc847472a67f6298547d60 /usb/class/dfu/usb_protocol_dfu.h
parent74a8e3b61594054e810c9e0833ae07832a7d7e49 (diff)
add documentation and fix timeout value
Diffstat (limited to 'usb/class/dfu/usb_protocol_dfu.h')
-rw-r--r--usb/class/dfu/usb_protocol_dfu.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/usb/class/dfu/usb_protocol_dfu.h b/usb/class/dfu/usb_protocol_dfu.h
index 2e7323f..7f82743 100644
--- a/usb/class/dfu/usb_protocol_dfu.h
+++ b/usb/class/dfu/usb_protocol_dfu.h
@@ -79,15 +79,15 @@ COMPILER_PACK_SET(1)
//! DFU Functional Descriptor
typedef struct usb_dfu_func_desc {
- uint8_t bFunctionLength;
- uint8_t bDescriptorType;
- uint8_t bmAttributes;
- le16_t wDetachTimeOut;
- le16_t wTransferSize;
- le16_t bcdDFUVersion;
+ uint8_t bFunctionLength; /**< Size of this descriptor, in bytes (always 9) */
+ uint8_t bDescriptorType; /**< DFU FUNCTIONAL descriptor type (always 0x21) */
+ uint8_t bmAttributes; /**< DFU attributes bit mask */
+ le16_t wDetachTimeOut; /**< Time, in milliseconds, that the device will wait after receipt of the DFU_DETACH request */
+ le16_t wTransferSize; /**< Maximum number of bytes that the device can accept per control-write transaction */
+ le16_t bcdDFUVersion; /**< Numeric expression identifying the version of the DFU Specification release */
} usb_dfu_func_desc_t;
-#define USB_DFU_FUNC_DESC_LEN 0x09
+#define USB_DFU_FUNC_DESC_LEN 9
#define USB_DFU_FUNC_DESC_TYPE 0x21
#define USB_DFU_FUNC_DESC_BYTES(bmAttributes, wDetachTimeOut, wTransferSize, bcdDFUVersion) \
USB_DFU_FUNC_DESC_LEN, /* bFunctionLength */ \