summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-11-05 20:48:18 +0700
committerGitHub <[email protected]>2021-11-05 20:48:18 +0700
commita9ce2dbcb4cbf50e71565e3d1c8140058be76ed6 (patch)
treeafad2728b5e48fba1942721ab6affeadc1d21c40 /src/device
parentc04006bc1386506bdea7660ad90fa25aab63c730 (diff)
parentd20a5b3a0918cdccfccbed6f623ff0e854392c82 (diff)
Merge pull request #1182 from kasjer/kasjer/update-bth-iad
Update bth for IAD support
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/device/usbd.h b/src/device/usbd.h
index 8d02de1ff..ec34817fa 100644
--- a/src/device/usbd.h
+++ b/src/device/usbd.h
@@ -763,8 +763,8 @@ TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb
#define CFG_TUD_BTH_ISO_ALT_COUNT 0
#endif
-// Length of template descriptor: 30 bytes + number of ISO alternatives * 23
-#define TUD_BTH_DESC_LEN (9 + 7 + 7 + 7 + (CFG_TUD_BTH_ISO_ALT_COUNT) * (9 + 7 + 7))
+// Length of template descriptor: 38 bytes + number of ISO alternatives * 23
+#define TUD_BTH_DESC_LEN (8 + 9 + 7 + 7 + 7 + (CFG_TUD_BTH_ISO_ALT_COUNT) * (9 + 7 + 7))
/* Primary Interface */
#define TUD_BTH_PRI_ITF(_itfnum, _stridx, _ep_evt, _ep_evt_size, _ep_evt_interval, _ep_in, _ep_out, _ep_size) \
@@ -806,6 +806,8 @@ TU_ATTR_WEAK bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb
// Interface number, string index, attributes, event endpoint, event endpoint size, interval, data in, data out, data endpoint size, iso endpoint sizes
// TODO BTH should also use IAD like CDC for composite device
#define TUD_BTH_DESCRIPTOR(_itfnum, _stridx, _ep_evt, _ep_evt_size, _ep_evt_interval, _ep_in, _ep_out, _ep_size,...) \
+ /* Interface Associate */\
+ 8, TUSB_DESC_INTERFACE_ASSOCIATION, _itfnum, 2, TUD_BT_APP_CLASS, TUD_BT_APP_SUBCLASS, TUD_BT_PROTOCOL_PRIMARY_CONTROLLER, 0,\
TUD_BTH_PRI_ITF(_itfnum, _stridx, _ep_evt, _ep_evt_size, _ep_evt_interval, _ep_in, _ep_out, _ep_size) \
TUD_BTH_ISO_ITFS(_itfnum + 1, _ep_in + 1, _ep_out + 1, __VA_ARGS__)