summaryrefslogtreecommitdiff
path: root/src/device/usbd.h
diff options
context:
space:
mode:
authorMengsk <[email protected]>2021-07-05 17:56:21 +0200
committerMengsk <[email protected]>2021-07-05 17:56:21 +0200
commitc2d8ed3fd1fdb722d67a30a6768720c9ed578779 (patch)
tree3cafa16736a498e689ea25f42635b18db62ae762 /src/device/usbd.h
parent2ae19ce40dec5aa13d9eca9b990aa704c2579581 (diff)
Add alt settings support in DFU class.
Diffstat (limited to 'src/device/usbd.h')
-rw-r--r--src/device/usbd.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 3857295d7..41c78de10 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -603,11 +603,11 @@ TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb
// Length of template descriptr: 18 bytes
#define TUD_DFU_MODE_DESC_LEN (9 + 9)
-// DFU runtime descriptor
-// Interface number, string index, attributes, detach timeout, transfer size
-#define TUD_DFU_MODE_DESCRIPTOR(_itfnum, _stridx, _attr, _timeout, _xfer_size) \
+// DFU mode descriptor
+// Interface number, alt settings, string index, attributes, detach timeout, transfer size
+#define TUD_DFU_MODE_DESCRIPTOR(_itfnum, _alt, _stridx, _attr, _timeout, _xfer_size) \
/* Interface */ \
- 9, TUSB_DESC_INTERFACE, _itfnum, 0, 0, TUD_DFU_APP_CLASS, TUD_DFU_APP_SUBCLASS, DFU_PROTOCOL_DFU, _stridx, \
+ 9, TUSB_DESC_INTERFACE, _itfnum, _alt, 0, TUD_DFU_APP_CLASS, TUD_DFU_APP_SUBCLASS, DFU_PROTOCOL_DFU, _stridx, \
/* Function */ \
9, DFU_DESC_FUNCTIONAL, _attr, U16_TO_U8S_LE(_timeout), U16_TO_U8S_LE(_xfer_size), U16_TO_U8S_LE(0x0101)