mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 04:20:20 +00:00
winusb: on acl read error, reset pipe and resubmit transfer
This commit is contained in:
parent
bca6857aa1
commit
507db03762
@ -531,7 +531,17 @@ static void usb_process_acl_in(btstack_data_source_t *ds, btstack_data_source_ca
|
|||||||
// IO_INCOMPLETE -> wait for completed
|
// IO_INCOMPLETE -> wait for completed
|
||||||
btstack_run_loop_enable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_READ);
|
btstack_run_loop_enable_data_source_callbacks(ds, DATA_SOURCE_CALLBACK_READ);
|
||||||
} else {
|
} else {
|
||||||
log_error("usb_process_acl_in: error writing");
|
log_error("usb_process_acl_in: error reading");
|
||||||
|
|
||||||
|
// Reset Pipe
|
||||||
|
err = WinUsb_ResetPipe(usb_interface_0_handle, acl_in_addr);
|
||||||
|
log_info("WinUsb_ResetPipe: result %u", err);
|
||||||
|
if (err){
|
||||||
|
log_info("WinUsb_ResetPipe error %u", GetLastError());
|
||||||
|
}
|
||||||
|
|
||||||
|
// re-submit transfer
|
||||||
|
usb_submit_acl_in_transfer();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user