• Home
  • Raw
  • Download

Lines Matching refs:hUSB

148 int HdcDaemonUSB::ConnectEPPoint(HUSB hUSB)  in ConnectEPPoint()  argument
177 if ((hUSB->bulkOut = open(outPath.c_str(), O_RDWR)) < 0) { in ConnectEPPoint()
182 if ((hUSB->bulkIn = open(inPath.c_str(), O_RDWR)) < 0) { in ConnectEPPoint()
188 fcntl(hUSB->bulkOut, F_SETFD, FD_CLOEXEC); in ConnectEPPoint()
189 fcntl(hUSB->bulkIn, F_SETFD, FD_CLOEXEC); in ConnectEPPoint()
190 hUSB->wMaxPacketSizeSend = GetMaxPacketSize(hUSB->bulkIn); in ConnectEPPoint()
192 … WRITE_LOG(LOG_DEBUG, "New bulk in\\out open bulkout:%d bulkin:%d", hUSB->bulkOut, hUSB->bulkIn); in ConnectEPPoint()
197 CloseEndpoint(hUSB, true); in ConnectEPPoint()
202 void HdcDaemonUSB::CloseEndpoint(HUSB hUSB, bool closeCtrlEp) in CloseEndpoint() argument
204 Base::CloseFd(hUSB->bulkIn); in CloseEndpoint()
205 Base::CloseFd(hUSB->bulkOut); in CloseEndpoint()
513 auto hUSB = reinterpret_cast<HUSB>(ctxIo->data); in OnUSBRead() local
520 if (bytesIOBytes > hUSB->wMaxPacketSizeSend && bytesIOBytes != thisClass->saveNextReadSize) { in OnUSBRead()
566 …int nextReadSize = childRet == 0 ? hUSB->wMaxPacketSizeSend : std::min(childRet, Base::GetUsbffsBu… in OnUSBRead()
568 if (thisClass->LoopUSBRead(hUSB, nextReadSize) < 0) { in OnUSBRead()
581 int HdcDaemonUSB::LoopUSBRead(HUSB hUSB, int readMaxWanted) in LoopUSBRead() argument
587 ctxRecv.data = hUSB; in LoopUSBRead()
593 ret = uv_fs_read(&daemon->loopMain, req, hUSB->bulkOut, &iov, 1, -1, OnUSBRead); in LoopUSBRead()
606 HUSB hUSB = &thisClass->usbHandle; in WatchEPTimer() local
613 if (hUSB->bulkIn > 0) { in WatchEPTimer()
618 if (hUSB->bulkOut > 0) { in WatchEPTimer()
632 if (thisClass->ConnectEPPoint(hUSB) != RET_SUCCESS) { in WatchEPTimer()
637 thisClass->LoopUSBRead(hUSB, hUSB->wMaxPacketSizeSend); in WatchEPTimer()