hosted/cmsis_dap: Added a call to hid_error() when hid_open fails

This commit is contained in:
dragonmux 2022-07-11 10:02:50 -04:00 committed by Piotr Esden-Tempski
parent 000b05e1eb
commit 4bea5cfe81
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ int dap_init(bmp_info_t *info)
} }
handle = hid_open(info->vid, info->pid, (serial[0]) ? serial : NULL); handle = hid_open(info->vid, info->pid, (serial[0]) ? serial : NULL);
if (!handle) { if (!handle) {
DEBUG_WARN("hid_open failed\n"); DEBUG_WARN("hid_open failed: %ls\n", hid_error(NULL));
return -1; return -1;
} }
} else if (type == CMSIS_TYPE_BULK) { } else if (type == CMSIS_TYPE_BULK) {