Skip to content

Commit f6e3136

Browse files
committed
don't wakeup device to avoid FTDI reset
1 parent 658f212 commit f6e3136

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

windows.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -455,18 +455,6 @@ SP_PRIV enum sp_return get_port_details(struct sp_port *port, bool fetchDescript
455455

456456
port->usb_path = strdup(usb_path);
457457

458-
/* Wake up the USB device to be able to read string descriptor. */
459-
char *escaped_port_name;
460-
HANDLE handle;
461-
if (!(escaped_port_name = malloc(strlen(port->name) + 5)))
462-
RETURN_ERROR(SP_ERR_MEM, "Escaped port name malloc failed");
463-
sprintf(escaped_port_name, "\\\\.\\%s", port->name);
464-
handle = CreateFile(escaped_port_name, GENERIC_READ, 0, 0,
465-
OPEN_EXISTING,
466-
FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED, 0);
467-
free(escaped_port_name);
468-
CloseHandle(handle);
469-
470458
/* Retrieve USB device details from the device descriptor. */
471459
get_usb_details(port, device_info_data.DevInst, fetchDescriptors);
472460
}

0 commit comments

Comments
 (0)