added open flag indicator for FTDI

This commit is contained in:
2025-10-19 19:56:05 +02:00
parent bc15407cad
commit 65e2def501
3 changed files with 14 additions and 4 deletions

View File

@@ -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);
}
}