summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorJeremiah McCarthy <[email protected]>2021-03-26 15:30:43 -0400
committerJeremiah McCarthy <[email protected]>2021-03-26 15:30:43 -0400
commit1138f8cc704e09af3335e253e5f244fde90d982f (patch)
tree568e5878d290888678f9f0d281752547970d2170 /src/common
parent161b8587bd435ae2dc6f0aafac41019a09580b80 (diff)
Add DFU Class per Version 1.1 Spec
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_types.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h
index ba3fe2c41..a462b498f 100644
--- a/src/common/tusb_types.h
+++ b/src/common/tusb_types.h
@@ -421,6 +421,25 @@ typedef struct TU_ATTR_PACKED
char url[];
} tusb_desc_webusb_url_t;
+// DFU Functional Descriptor
+typedef struct TU_ATTR_PACKED
+{
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+
+ struct TU_ATTR_PACKED {
+ uint8_t bitCanDnload : 1;
+ uint8_t bitCanUpload : 1;
+ uint8_t bitManifestationTolerant : 1;
+ uint8_t bitWillDetach : 1;
+ uint8_t reserved : 4;
+ } bmAttributes;
+
+ uint16_t wDetachTimeOut;
+ uint16_t wTransferSize;
+ uint16_t bcdDFUVersion;
+} tusb_desc_dfu_functional_t;
+
/*------------------------------------------------------------------*/
/* Types
*------------------------------------------------------------------*/