Lines Matching refs:cmdFifo
100 if ((buf == NULL) || (telnetDev->cmdFifo == NULL)) { in TelnetTx()
106 if (bufLen > telnetDev->cmdFifo->fifoNum) { in TelnetTx()
107 bufLen = telnetDev->cmdFifo->fifoNum; in TelnetTx()
117 telnetDev->cmdFifo->rxBuf[telnetDev->cmdFifo->rxIndex] = *buf; in TelnetTx()
118 telnetDev->cmdFifo->rxIndex++; in TelnetTx()
119 telnetDev->cmdFifo->rxIndex %= FIFO_MAX; in TelnetTx()
122 telnetDev->cmdFifo->fifoNum -= bufLen; in TelnetTx()
151 if (telnetDev->cmdFifo == NULL) { in TelnetOpen()
155 telnetDev->cmdFifo = (TELNTE_FIFO_S *)malloc(sizeof(TELNTE_FIFO_S)); in TelnetOpen()
156 if (telnetDev->cmdFifo == NULL) { in TelnetOpen()
160 (VOID)memset_s(telnetDev->cmdFifo, sizeof(TELNTE_FIFO_S), 0, sizeof(TELNTE_FIFO_S)); in TelnetOpen()
161 telnetDev->cmdFifo->fifoNum = FIFO_MAX; in TelnetOpen()
183 free(telnetDev->cmdFifo); in TelnetClose()
184 telnetDev->cmdFifo = NULL; in TelnetClose()
207 if ((buf == NULL) || (telnetDev == NULL) || (telnetDev->cmdFifo == NULL)) { in TelnetRead()
218 if (bufLen > (FIFO_MAX - telnetDev->cmdFifo->fifoNum)) { in TelnetRead()
219 bufLen = FIFO_MAX - telnetDev->cmdFifo->fifoNum; in TelnetRead()
223 *buf++ = telnetDev->cmdFifo->rxBuf[telnetDev->cmdFifo->rxOutIndex++]; in TelnetRead()
224 if (telnetDev->cmdFifo->rxOutIndex >= FIFO_MAX) { in TelnetRead()
225 telnetDev->cmdFifo->rxOutIndex = 0; in TelnetRead()
228 telnetDev->cmdFifo->fifoNum += bufLen; in TelnetRead()
230 if (telnetDev->cmdFifo->fifoNum == FIFO_MAX) { in TelnetRead()
252 if ((buf == NULL) || (telnetDev == NULL) || (telnetDev->cmdFifo == NULL)) { in TelnetWrite()
319 if ((telnetDev == NULL) || (telnetDev->cmdFifo == NULL)) { in TelnetPoll()
327 if (telnetDev->cmdFifo->fifoNum != FIFO_MAX) { in TelnetPoll()
352 free(g_telnetDev.cmdFifo); in TelnetedUnregister()
353 g_telnetDev.cmdFifo = NULL; in TelnetedUnregister()
365 g_telnetDev.cmdFifo = NULL; in TelnetedRegister()