summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorJeremiah McCarthy <[email protected]>2021-05-06 12:18:55 -0400
committerJeremiah McCarthy <[email protected]>2021-05-06 12:18:55 -0400
commit05892a5a1ee9c50cb966b2e8ec8243ef97f794e2 (patch)
tree3ad797edb1913625b824c1524e55be24dcd74e70 /src/common
parentee00918b7c0f88bdf4fb7f9f48765c2ee7758891 (diff)
parentb51e0eb860b541ff27fb93b39263748b12bb1315 (diff)
Merge branch 'master' of github.com:xmos-jmccarthy/tinyusb
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_common.h2
-rw-r--r--src/common/tusb_types.h23
2 files changed, 24 insertions, 1 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h
index 2cc12c6be..88e85c9e0 100644
--- a/src/common/tusb_common.h
+++ b/src/common/tusb_common.h
@@ -1,4 +1,4 @@
-/*
+/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
diff --git a/src/common/tusb_types.h b/src/common/tusb_types.h
index ba3fe2c41..7703ebb7b 100644
--- a/src/common/tusb_types.h
+++ b/src/common/tusb_types.h
@@ -421,6 +421,29 @@ 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;
+
+ union {
+ 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;
+
+ uint8_t bAttributes;
+ };
+
+ uint16_t wDetachTimeOut;
+ uint16_t wTransferSize;
+ uint16_t bcdDFUVersion;
+} tusb_desc_dfu_functional_t;
+
/*------------------------------------------------------------------*/
/* Types
*------------------------------------------------------------------*/