diff options
| author | hathach <[email protected]> | 2021-09-15 00:51:01 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-09-15 00:51:01 +0700 |
| commit | a23944035dab67a206edad9e31e3ee7400b68bbb (patch) | |
| tree | f2c01ad7fe2c1ebd3a6cd7bdb58724caf7ae5b43 /src/device/usbd.c | |
| parent | b4745222457d2a2c6c6e6a0747dd6082557c4c8e (diff) | |
correct assoc_itf_count for bth driver
Diffstat (limited to 'src/device/usbd.c')
| -rw-r--r-- | src/device/usbd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c index f23d3048d..f7846cc0a 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -921,6 +921,17 @@ static bool process_set_config(uint8_t rhport, uint8_t cfg_num) } #endif +#if CFG_TUD_BTH && CFG_TUD_BTH_ISO_ALT_COUNT + // BTH implementation currently does not use IAD. TODO should also use IAD for composite device + if (1 == assoc_itf_count && + TUD_BT_APP_CLASS == desc_itf->bInterfaceClass && + TUD_BT_APP_SUBCLASS == desc_itf->bInterfaceSubClass && + TUD_BT_PROTOCOL_PRIMARY_CONTROLLER == desc_itf->bInterfaceProtocol) + { + assoc_itf_count = 2; + } +#endif + uint16_t const drv_len = tu_desc_get_interface_total_len(desc_itf, assoc_itf_count, desc_end-p_desc); TU_ASSERT(drv_len >= sizeof(tusb_desc_interface_t)); |
