hosted/cmsis_dap: Verify that a v2 interface has endpoints.

This commit is contained in:
Vegard Storheil Eriksen 2021-04-27 11:39:43 +02:00
parent 494524dd85
commit f121350fc9
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ static bmp_type_t find_cmsis_dap_interface(libusb_device *dev,bmp_info_t *info)
if (interface->bInterfaceClass == 0x03) {
type = BMP_TYPE_CMSIS_DAP_V1;
} else if (interface->bInterfaceClass == 0xff) {
} else if (interface->bInterfaceClass == 0xff && interface->bNumEndpoints == 2) {
type = BMP_TYPE_CMSIS_DAP_V2;
info->interface_num = interface->bInterfaceNumber;