Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelfmlourenco authored Apr 9, 2022
1 parent 04d9d21 commit aec1059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mcp2210.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ int MCP2210::open(quint16 vid, quint16 pid, const QString &serial)
} else if (libusb_init(&context_) != 0) { // Initialize libusb. In case of failure
retval = ERROR_INIT;
} else { // If libusb is initialized
if (serial.isNull()) { // Note that serial, by omission, is an empty string
if (serial.isNull()) { // Note that serial, by omission, is a null QString
handle_ = libusb_open_device_with_vid_pid(context_, vid, pid); // If no serial number is specified, this will open the first device found with matching VID and PID
} else {
handle_ = libusb_open_device_with_vid_pid_serial(context_, vid, pid, reinterpret_cast<unsigned char *>(serial.toLatin1().data()));
Expand Down

0 comments on commit aec1059

Please sign in to comment.