generated from thinkode/modelRepository
added open flag indicator for FTDI
This commit is contained in:
11
hardware/third-party/ftdi/detectFTDI.cpp
vendored
11
hardware/third-party/ftdi/detectFTDI.cpp
vendored
@@ -28,8 +28,17 @@ int main() {
|
||||
|
||||
for (int i = 0; i < numDevs; i++) {
|
||||
if (devInfo[i].SerialNumber[0] != '\0') {
|
||||
std::cout << i << ":" << devInfo[i].SerialNumber << ":" << devInfo[i].Description << std::endl;
|
||||
std::cout << i << ":" << devInfo[i].SerialNumber << ":" << devInfo[i].Description << ":";
|
||||
|
||||
// Add information about the hardware open state
|
||||
if (devInfo[i].Flags & FT_FLAGS_OPENED) {
|
||||
std::cout << "O" << std::endl;
|
||||
} else {
|
||||
std::cout << "C" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
free(devInfo);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user