mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-25 07:43:38 +00:00
winusb: log messages during usb_close
This commit is contained in:
parent
48167703f1
commit
661115ee91
@ -1213,6 +1213,8 @@ static int usb_close(void){
|
||||
}
|
||||
#endif
|
||||
|
||||
log_info("usb_close abort event and acl pipes");
|
||||
|
||||
// stop transfers
|
||||
WinUsb_AbortPipe(usb_interface_0_handle, event_in_addr);
|
||||
WinUsb_AbortPipe(usb_interface_0_handle, acl_in_addr);
|
||||
@ -1224,11 +1226,14 @@ static int usb_close(void){
|
||||
|
||||
// control transfer cannot be stopped, just wait for completion
|
||||
if (usb_command_out_active){
|
||||
log_info("usb_close command out active, wait for complete");
|
||||
DWORD bytes_transferred;
|
||||
WinUsb_GetOverlappedResult(usb_interface_0_handle, &usb_overlapped_command_out, &bytes_transferred, TRUE);
|
||||
usb_command_out_active = 0;
|
||||
}
|
||||
|
||||
log_info("usb_close free resources");
|
||||
|
||||
// free everything
|
||||
usb_free_resources();
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user