Home
last modified time | relevance | path

Searched refs:hUART (Results 1 – 11 of 11) sorted by relevance

/developtools/hdc/src/host/
Dhost_uart.cpp77 HUART hUART = hSession->hUART; in UartReadThread() local
80 WRITE_LOG(LOG_DEBUG, "%s devUartHandle:%d", __FUNCTION__, hUART->devUartHandle); in UartReadThread()
87 ssize_t bytesRead = ReadUartDev(dataReadBuf, expectedSize, *hUART); in UartReadThread()
246 int HdcHostUART::WinSetSerial(HUART hUART, string serialPort, int byteSize, int eqBaudRate) in EnumSerialPort() argument
250 GetCommTimeouts(hUART->devUartHandle, &timeouts); in EnumSerialPort()
257 SetCommTimeouts(hUART->devUartHandle, &timeouts); in EnumSerialPort()
260 if (!SetupComm(hUART->devUartHandle, max, max)) { in EnumSerialPort()
266 if (!GetCommState(hUART->devUartHandle, &dcb)) { in EnumSerialPort()
276 if (!SetCommState(hUART->devUartHandle, &dcb)) { in EnumSerialPort()
282 if (!PurgeComm(hUART->devUartHandle, in EnumSerialPort()
[all …]
Dhost_uart.h79 bool ConnectMyNeed(HUART hUART, std::string connectKey = "");
81 virtual void CloseSerialPort(const HUART hUART);
96 int WinSetSerial(HUART hUART, string serialPort, int byteSize, int eqBaudRate);
Dserver.cpp743 if (hSession->hUART->retryCount > uartConnectRetryMax) { in UartPreConnect()
745 hSession->hUART->retryCount); in UartPreConnect()
750 hSession->hUART->retryCount++; in UartPreConnect()
/developtools/hdc/test/unittest/common/
Dhost_uart_test.cpp103 mySession.hUART = &myUART; in HdcHostUARTTest()
418 if (mySession.hUART->readThread.joinable()) {
419 mySession.hUART->readThread.join();
431 mySession.hUART = &newUART;
456 mySession.hUART = &newUART;
743 mySession.hUART = &myUART;
793 EXPECT_CALL(mockHostUART, CloseSerialPort(mySession.hUART)).WillOnce(Return());
806 EXPECT_EQ(mySession.hUART->ioCancel, false);
808 EXPECT_EQ(mySession.hUART->ioCancel, false);
810 EXPECT_EQ(mySession.hUART->ioCancel, true);
[all …]
Ddaemon_uart_test.cpp361 mySession.hUART = &myUART;
365 mySession.hUART->resetIO = false;
377 mySession.hUART->resetIO = true;
379 mySession.hUART->resetIO = false;
657 mySession.hUART = &myUART;
664 EXPECT_EQ(mySession.hUART->resetIO, true);
665 mySession.hUART->resetIO = false;
671 EXPECT_EQ(mySession.hUART->resetIO, false);
683 mySession.hUART = &myUART;
698 mySession.hUART = &myUART;
Duart_test.cpp120 server->hUART = serverHdcUart.get(); in SetUp()
126 daemon->hUART = daemonHdcUart.get(); in SetUp()
217 .WillRepeatedly([&](HSession hUART, uint32_t sessionId) { in __anond10266a50302() argument
218 mockUARTBase.HdcUARTBase::SendUartSoftReset(hUART, sessionId); in __anond10266a50302()
389 ASSERT_FALSE(server->hUART->resetIO);
397 ASSERT_FALSE(server->hUART->resetIO);
407 ASSERT_TRUE(server->hUART->resetIO);
463 hdcSession.hUART = &uart;
/developtools/hdc/src/common/
Duart.cpp484 if (hSession->hUART->dispatchedPackageIndex == packageIndex) { in PackageProcess()
490 hSession->hUART->dispatchedPackageIndex = packageIndex; in PackageProcess()
502 ResponseUartTrans(hSession->sessionId, ++hSession->hUART->packageIndex, in PackageProcess()
552 ssize_t sendBytes = WriteUartDev(data, length, *hSession->hUART); in SendUARTRaw()
586 if (hSession->serverOrDaemon && !hSession->hUART->resetIO) { in UartSendToHdcStream()
590 hSession->hUART->resetIO = true; in UartSendToHdcStream()
596 hSession->hUART->streamSize += head->dataSize; // this is only for debug, in UartSendToHdcStream()
598 hSession->hUART->streamSize.load()); in UartSendToHdcStream()
915 head->packageIndex = ++hSession->hUART->packageIndex; in SendUARTData()
959 hSession->hUART->streamSize.load()); in ReadDataFromUARTStream()
[all …]
Dsession.cpp207 if ((hs->connType != CONN_SERIAL) or (hs->hUART == nullptr)) { in EnumUARTDeviceRegister()
379 HUART hUART = new HdcUART(); in MallocSessionByConnectType() local
380 if (!hUART) { in MallocSessionByConnectType()
384 hSession->hUART = hUART; in MallocSessionByConnectType()
514 if (!hSession->hUART) { in FreeSessionByConnectType()
517 HUART hUART = hSession->hUART; in FreeSessionByConnectType() local
518 if (!hUART) { in FreeSessionByConnectType()
526 if (hUART->devUartHandle != INVALID_HANDLE_VALUE) { in FreeSessionByConnectType()
527 CloseHandle(hUART->devUartHandle); in FreeSessionByConnectType()
528 hUART->devUartHandle = INVALID_HANDLE_VALUE; in FreeSessionByConnectType()
[all …]
Ddefine_plus.h421 HUART hUART = nullptr; member
468 hUART = nullptr; in HdcSession()
Duart.h182 virtual void SendUartSoftReset(HSession hUART, uint32_t sessionId) {}; in SendUartSoftReset() argument
/developtools/hdc/src/daemon/
Ddaemon_uart.cpp171 if (hSession->hUART != nullptr) { in ResetOldSession()
172 hSession->hUART->resetIO = true; in ResetOldSession()
316 if (isAlive and !hSession->isDead and uartHandle >= 0 and !hSession->hUART->resetIO) { in IsSendReady()
325 } else if (hSession->hUART->resetIO) { in IsSendReady()