Returns a list of ports this could be available on
| 2533 | |
| 2534 | // Returns a list of ports this could be available on |
| 2535 | void ArduinoInterface::enumeratePorts(std::vector<std::wstring>& portList) { |
| 2536 | portList.clear(); |
| 2537 | std::vector<SerialIO::SerialPortInformation> prts; |
| 2538 | |
| 2539 | SerialIO prt; |
| 2540 | prt.enumSerialPorts(prts); |
| 2541 | |
| 2542 | for (const SerialIO::SerialPortInformation& port : prts) { |
| 2543 | // Skip CH340 boards |
| 2544 | if ((port.vid == 0x1a86) && (port.pid == 0x7523)) continue; |
| 2545 | |
| 2546 | // Skip any Greaseweazle boards |
| 2547 | if ((port.vid == 0x1209) && (port.pid == 0x4d69)) continue; |
| 2548 | if ((port.vid == 0x1209) && (port.pid == 0x0001)) continue; |
| 2549 | if (port.productName == L"Greaseweazle") continue; |
| 2550 | if (port.instanceID.find(L"\\GW") != std::wstring::npos) continue; |
| 2551 | |
| 2552 | // Skip Supercard pro |
| 2553 | if (port.portName.find(L"SCP-JIM") != std::wstring::npos) continue; |
| 2554 | if (port.portName.find(L"Supercard Pro") != std::wstring::npos) continue; |
| 2555 | |
| 2556 | portList.push_back(port.portName); |
| 2557 | } |
| 2558 | } |
| 2559 | |
| 2560 | // Reset reason information |
| 2561 | DiagnosticResponse ArduinoInterface::getResetReason(bool& WD, bool& BOD, bool& ExtReset, bool& PowerOn) { |
nothing calls this directly
no test coverage detected