Home
last modified time | relevance | path

Searched refs:portName (Results 1 – 3 of 3) sorted by relevance

/developtools/hdc/src/host/
Dhost_uart.cpp326 std::string portName; in EnumSerialPort() local
334 if (!GetPortFromKey(connectKey, portName, baudRate)) { in EnumSerialPort()
340 WRITE_LOG(LOG_ALL, "%s try to open %s with rate %u", __FUNCTION__, portName.c_str(), in EnumSerialPort()
350 _stprintf_s(apiBuf, MAX_PATH, _T("\\\\.\\%s"), portName.c_str()); in EnumSerialPort()
357 WRITE_LOG(LOG_DEBUG, "%s CreateFile %s err:%d.", __FUNCTION__, portName.c_str(), in EnumSerialPort()
361 uart.serialPort = portName; in EnumSerialPort()
371 string uartName = Base::CanonicalizeSpecPath(portName); in EnumSerialPort()
383 uart.serialPort = portName; in EnumSerialPort()
735 bool HdcHostUART::GetPortFromKey(const std::string &connectKey, std::string &portName, in EnumSerialPort() argument
743 portName = result[0]; in EnumSerialPort()
[all …]
Dhost_uart.h80 virtual int OpenSerialPort(const std::string &portName = "");
118 bool GetPortFromKey(const std::string &connectKey, std::string &portName, uint32_t &baudRate);
/developtools/hdc/test/unittest/common/
Dhost_uart_test.cpp769 std::string portName; variable
772 EXPECT_EQ(mockHostUART.GetPortFromKey("COM1", portName, baudRate), true);
773 EXPECT_STREQ(portName.c_str(), "COM1");
776 EXPECT_EQ(mockHostUART.GetPortFromKey("COM1,aaa", portName, baudRate), false);
778 EXPECT_EQ(mockHostUART.GetPortFromKey("COM1,111", portName, baudRate), true);
779 EXPECT_STREQ(portName.c_str(), "COM1");