Lines Matching refs:ttyFd
73 int ttyFd = -1;
82 ttyFd = open(ttyPort, O_RDWR);
83 if (ttyFd == -1) {
88 DBG_TRACE("%s opened with port %d", ttyPort, ttyFd);
89 if (tcflush(ttyFd, TCIOFLUSH) == 0) {
109 close(ttyFd);
122 if (tcflush(ttyFd, TCIOFLUSH) == 0) {
137 if (tcflush(ttyFd, TCIFLUSH) == 0) {
167 DBG_ERROR("Read Error unable to read port: %d from device: %s", ttyFd, ttyPort);
179 close(ttyFd);
207 FD_SET(ttyFd, &readfs);
208 retVal = select(ttyFd+1, &readfs, NULL, NULL, &Timeout);
211 DBG_ERROR("Timeout on select() occurred on port %d. Receive <%d> bytes", ttyFd, numBytesRead);
225 if (FD_ISSET(ttyFd, &readfs)) {
227 retVal = read(ttyFd, &readwriteBuf[numBytesRead], MAX_BUF_LEN);
279 nwritten = write(ttyFd, readwriteBuf, len*8);
328 tcflush(ttyFd, TCIOFLUSH);
335 osize = write(ttyFd, pWake, 1);
361 DBG_ERROR("WakeUp Error unable to read port: %d, Bytes Read = %d", ttyFd, bytes_read);
365 if (tcflush(ttyFd, TCIOFLUSH) == 0) {
397 osize = write(ttyFd, byteptr, 1);
424 ret = tcgetattr( ttyFd, &termOptions );
433 ret = tcsetattr(ttyFd, TCSANOW, &termOptions );
448 tcgetattr(ttyFd, &tty);
489 tcflush(ttyFd, TCIFLUSH);
490 tcsetattr(ttyFd, TCSANOW, &tty);