Add DFU Class per Version 1.1 Spec

This commit is contained in:
Jeremiah McCarthy
2021-03-26 15:30:43 -04:00
parent 161b8587bd
commit 1138f8cc70
8 changed files with 881 additions and 64 deletions

View File

@@ -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
*------------------------------------------------------------------*/