cmsis_da: Add timeout to bulk commands.

This commit is contained in:
Uwe Bonnes 2021-10-31 12:19:54 +01:00
parent a4caec29b9
commit 2bc2db1140
1 changed files with 2 additions and 2 deletions

View File

@ -241,11 +241,11 @@ int dbg_dap_cmd(uint8_t *data, int size, int rsize)
} else if (type == CMSIS_TYPE_BULK) {
int transferred = 0;
res = libusb_bulk_transfer(usb_handle, out_ep, buffer + 1, rsize, &transferred, 0);
res = libusb_bulk_transfer(usb_handle, out_ep, data, rsize, &transferred, 500);
if (res < 0) {
DEBUG_WARN( "OUT error\n" );
}
res = libusb_bulk_transfer(usb_handle, in_ep, buffer, report_size, &transferred, 0);
res = libusb_bulk_transfer(usb_handle, in_ep, buffer, report_size, &transferred, 500);
if (res < 0) {
DEBUG_WARN( "IN error\n" );
}