MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / enumeratePorts

Method enumeratePorts

external/floppybridge/src/ArduinoInterface.cpp:2535–2558  ·  view source on GitHub ↗

Returns a list of ports this could be available on

Source from the content-addressed store, hash-verified

2533
2534// Returns a list of ports this could be available on
2535void 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
2561DiagnosticResponse ArduinoInterface::getResetReason(bool& WD, bool& BOD, bool& ExtReset, bool& PowerOn) {

Callers

nothing calls this directly

Calls 4

enumSerialPortsMethod · 0.80
clearMethod · 0.45
findMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected