Home | History | Annotate | Download | only in src

Lines Matching refs:pLlcpSocket

37 static NFCSTATUS phFriNfc_Llcp_Send_ReceiveReady_Frame(phFriNfc_LlcpTransport_Socket_t*    pLlcpSocket);
38 static NFCSTATUS phFriNfc_Llcp_Send_ReceiveNotReady_Frame(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket);
269 static void phFriNfc_LlcpTransport_ConnectionOriented_Abort(phFriNfc_LlcpTransport_Socket_t * pLlcpSocket)
271 if (pLlcpSocket->pfSocketSend_Cb != NULL)
273 pLlcpSocket->pfSocketSend_Cb(pLlcpSocket->pSendContext, NFCSTATUS_ABORTED);
274 pLlcpSocket->pfSocketSend_Cb = NULL;
276 pLlcpSocket->pSendContext = NULL;
277 if (pLlcpSocket->pfSocketRecv_Cb != NULL)
279 pLlcpSocket->pfSocketRecv_Cb(pLlcpSocket->pRecvContext, NFCSTATUS_ABORTED);
280 pLlcpSocket->pfSocketRecv_Cb = NULL;
282 pLlcpSocket->pRecvContext = NULL;
283 if (pLlcpSocket->pfSocketAccept_Cb != NULL)
285 pLlcpSocket->pfSocketAccept_Cb(pLlcpSocket->pAcceptContext, NFCSTATUS_ABORTED);
286 pLlcpSocket->pfSocketAccept_Cb = NULL;
288 pLlcpSocket->pAcceptContext = NULL;
289 if (pLlcpSocket->pfSocketConnect_Cb != NULL)
291 pLlcpSocket->pfSocketConnect_Cb(pLlcpSocket->pConnectContext, 0, NFCSTATUS_ABORTED);
292 pLlcpSocket->pfSocketConnect_Cb = NULL;
294 pLlcpSocket->pConnectContext = NULL;
295 if (pLlcpSocket->pfSocketDisconnect_Cb != NULL)
297 pLlcpSocket->pfSocketDisconnect_Cb(pLlcpSocket->pDisconnectContext, NFCSTATUS_ABORTED);
298 pLlcpSocket->pfSocketDisconnect_Cb = NULL;
300 pLlcpSocket->pDisconnectContext = NULL;
302 pLlcpSocket->pfSocketRecvFrom_Cb = NULL;
303 pLlcpSocket->pfSocketListen_Cb = NULL;
304 pLlcpSocket->pListenContext = NULL;
308 static NFCSTATUS phFriNfc_Llcp_Send_ReceiveReady_Frame(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket)
313 if(testAndSetSendPending(pLlcpSocket->psTransport))
315 pLlcpSocket->bSocketRRPending = TRUE;
321 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap;
322 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_RR;
323 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap;
326 pLlcpSocket->sSequence.ns = 0;
327 pLlcpSocket->sSequence.nr = pLlcpSocket->socket_VR;
330 pLlcpSocket->socket_VRA = (uint8_t)pLlcpSocket->sSequence.nr;
333 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
334 &pLlcpSocket->sLlcpHeader,
335 &pLlcpSocket->sSequence,
338 pLlcpSocket->index,
339 pLlcpSocket->psTransport);
341 clearSendPending(pLlcpSocket->psTransport);
348 static NFCSTATUS phFriNfc_Llcp_Send_ReceiveNotReady_Frame(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket)
354 if(testAndSetSendPending(pLlcpSocket->psTransport))
356 pLlcpSocket->bSocketRNRPending = TRUE;
362 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap;
363 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_RNR;
364 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap;
367 pLlcpSocket->sSequence.ns = 0x00;
368 pLlcpSocket->sSequence.nr = pLlcpSocket->socket_VR;
371 pLlcpSocket->socket_VRA = (uint8_t)pLlcpSocket->sSequence.nr;
374 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
375 &pLlcpSocket->sLlcpHeader,
376 &pLlcpSocket->sSequence,
379 pLlcpSocket->index,
380 pLlcpSocket->psTransport);
382 clearSendPending(pLlcpSocket->psTransport);
472 phFriNfc_LlcpTransport_Socket_t *pLlcpSocket = NULL;
568 pLlcpSocket = &psTransport->pSocketTable[index];
571 pLlcpSocket->remoteMIU = remoteMIU;
572 pLlcpSocket->remoteRW = remoteRW;
575 pLlcpSocket->socket_dSap = ssap;
576 pLlcpSocket->socket_sSap = dsap;
579 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketBound;
580 pLlcpSocket->eSocket_Type = phFriNfc_LlcpTransport_eConnectionOriented;
590 if(pLlcpSocket != NULL)
593 pLlcpSocket->remoteMIU = 0;
594 pLlcpSocket->remoteRW = 0;
597 pLlcpSocket->socket_dSap = 0;
598 pLlcpSocket->socket_sSap = 0;
601 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDefault;
602 pLlcpSocket->eSocket_Type = phFriNfc_LlcpTransport_eDefaultType;
614 pListen_Cb(pListenContext,pLlcpSocket);
1522 * \param[out] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1534 NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_SocketGetLocalOptions(phFriNfc_LlcpTransport_Socket_t *pLlcpSocket,
1540 psLocalOptions->miu = pLlcpSocket->sSocketOption.miu;
1543 psLocalOptions->rw = pLlcpSocket->sSocketOption.rw;
1556 * \param[out] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1568 NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_SocketGetRemoteOptions(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1574 psRemoteOptions->miu = pLlcpSocket->remoteMIU;
1577 psRemoteOptions->rw = pLlcpSocket->remoteRW;
1594 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1607 NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_Listen(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1615 pLlcpSocket->pfSocketListen_Cb = pListen_Cb;
1618 pLlcpSocket->pListenContext = pContext;
1621 pLlcpSocket->bSocketListenPending = TRUE;
1624 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketRegistered;
1637 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1652 NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_Accept(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1666 memcpy(&pLlcpSocket->sSocketOption, psOptions, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t));
1669 pLlcpSocket ->localMIUX = (pLlcpSocket->sSocketOption.miu - PHFRINFC_LLCP_MIU_DEFAULT) & PHFRINFC_LLCP_TLV_MIUX_MASK;
1670 pLlcpSocket ->localRW = pLlcpSocket->sSocketOption.rw & PHFRINFC_LLCP_TLV_RW_MASK;
1673 for(i=0;i<pLlcpSocket->localRW;i++)
1675 pLlcpSocket->sSocketRwBufferTable[i].buffer = psWorkingBuffer->buffer + (i*pLlcpSocket->sSocketOption.miu);
1676 pLlcpSocket->sSocketRwBufferTable[i].length = 0;
1680 pLlcpSocket->sSocketSendBuffer.buffer = psWorkingBuffer->buffer + pLlcpSocket->bufferRwMaxLength;
1681 pLlcpSocket->sSocketSendBuffer.length = pLlcpSocket->bufferSendMaxLength;
1684 pLlcpSocket->sSocketLinearBuffer.buffer = psWorkingBuffer->buffer + pLlcpSocket->bufferRwMaxLength + pLlcpSocket->bufferSendMaxLength;
1685 pLlcpSocket->sSocketLinearBuffer.length = pLlcpSocket->bufferLinearLength;
1687 if(pLlcpSocket->sSocketLinearBuffer.length != 0)
1690 phFriNfc_Llcp_CyclicFifoInit(&pLlcpSocket->sCyclicFifoBuffer,
1691 pLlcpSocket->sSocketLinearBuffer.buffer,
1692 pLlcpSocket->sSocketLinearBuffer.length);
1695 pLlcpSocket->pSocketErrCb = pErr_Cb;
1696 pLlcpSocket->pContext = pContext;
1699 pLlcpSocket->pfSocketAccept_Cb = pAccept_RspCb;
1700 pLlcpSocket->pAcceptContext = pContext;
1703 pLlcpSocket->socket_VR = 0;
1704 pLlcpSocket->socket_VRA = 0;
1705 pLlcpSocket->socket_VS = 0;
1706 pLlcpSocket->socket_VSA = 0;
1709 if(pLlcpSocket->localMIUX != PHFRINFC_LLCP_MIUX_DEFAULT)
1712 phFriNfc_Llcp_EncodeMIUX(pLlcpSocket->localMIUX,
1716 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer,
1730 if(pLlcpSocket->sSocketOption.rw != PHFRINFC_LLCP_RW_DEFAULT)
1733 phFriNfc_Llcp_EncodeRW(&pLlcpSocket->sSocketOption.rw);
1736 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer,
1740 &pLlcpSocket->sSocketOption.rw);
1751 if(testAndSetSendPending(pLlcpSocket->psTransport))
1753 pLlcpSocket->bSocketAcceptPending = TRUE;
1756 pLlcpSocket->sSocketSendBuffer.length = offset;
1763 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap;
1764 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_CC;
1765 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap;
1768 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketAccepted;
1771 pLlcpSocket->sSocketSendBuffer.length = offset;
1774 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
1775 &pLlcpSocket->sLlcpHeader,
1777 &pLlcpSocket->sSocketSendBuffer,
1779 pLlcpSocket->index,
1780 pLlcpSocket->psTransport);
1782 clearSendPending(pLlcpSocket->psTransport);
1790 pLlcpSocket->pfSocketAccept_Cb = NULL;
1791 pLlcpSocket->pAcceptContext = NULL;
1805 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1812 NFCSTATUS phLibNfc_LlcpTransport_ConnectionOriented_Reject( phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1819 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketRejected;
1822 pLlcpSocket->pfSocketSend_Cb = pReject_RspCb;
1823 pLlcpSocket->pRejectContext = pContext;
1826 status = phFriNfc_LlcpTransport_SendDisconnectMode(pLlcpSocket->psTransport,
1827 pLlcpSocket->socket_dSap,
1828 pLlcpSocket->socket_sSap,
1841 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
1858 NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_Connect( phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
1872 pLlcpSocket->socket_dSap = nSap;
1877 pLlcpSocket->socket_dSap = PHFRINFC_LLCP_SAP_SDP;
1881 pLlcpSocket->pfSocketConnect_Cb = pConnect_RspCb;
1882 pLlcpSocket->pConnectContext = pContext;
1885 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap;
1886 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_CONNECT;
1887 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap;
1890 if(pLlcpSocket->localMIUX != PHFRINFC_LLCP_MIUX_DEFAULT)
1893 phFriNfc_Llcp_EncodeMIUX(pLlcpSocket->localMIUX,
1897 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer,
1910 if(pLlcpSocket->sSocketOption.rw != PHFRINFC_LLCP_RW_DEFAULT)
1913 phFriNfc_Llcp_EncodeRW(&pLlcpSocket->sSocketOption.rw);
1916 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer,
1920 &pLlcpSocket->sSocketOption.rw);
1932 status = phFriNfc_Llcp_EncodeTLV(&pLlcpSocket->sSocketSendBuffer,
1945 if(testAndSetSendPending(pLlcpSocket->psTransport))
1947 pLlcpSocket->bSocketConnectPending = TRUE;
1950 pLlcpSocket->sSocketSendBuffer.length = offset;
1957 pLlcpSocket->sSocketSendBuffer.length = offset;
1960 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketConnecting;
1962 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
1963 &pLlcpSocket->sLlcpHeader,
1965 &pLlcpSocket->sSocketSendBuffer,
1967 pLlcpSocket->index,
1968 pLlcpSocket->psTransport);
1970 clearSendPending(pLlcpSocket->psTransport);
1978 pLlcpSocket->pfSocketConnect_Cb = NULL;
1979 pLlcpSocket->pConnectContext = NULL;
1992 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
2009 NFCSTATUS phLibNfc_LlcpTransport_ConnectionOriented_Disconnect(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
2016 pLlcpSocket->pfSocketDisconnect_Cb = pDisconnect_RspCb;
2017 pLlcpSocket->pDisconnectContext = pContext;
2020 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDisconnecting;
2023 if((pLlcpSocket->bSocketSendPending == TRUE) || (pLlcpSocket->bSocketRecvPending == TRUE))
2025 pLlcpSocket->bSocketSendPending = FALSE;
2026 pLlcpSocket->bSocketRecvPending = FALSE;
2029 if (pLlcpSocket->pfSocketSend_Cb != NULL)
2032 pphFriNfc_LlcpTransportSocketSendCb_t pfSendCb = pLlcpSocket->pfSocketSend_Cb;
2033 void* pSendContext = pLlcpSocket->pSendContext;
2035 pLlcpSocket->pfSocketSend_Cb = NULL;
2036 pLlcpSocket->pSendContext = NULL;
2041 pLlcpSocket->pfSocketRecv_Cb != NULL)
2044 pphFriNfc_LlcpTransportSocketRecvCb_t pfRecvCb = pLlcpSocket->pfSocketRecv_Cb;
2045 void* pRecvContext = pLlcpSocket->pRecvContext;
2047 pLlcpSocket->pfSocketRecv_Cb = NULL;
2048 pLlcpSocket->pRecvContext = NULL;
2055 if( testAndSetSendPending(pLlcpSocket->psTransport))
2057 pLlcpSocket->bSocketDiscPending = TRUE;
2063 pLlcpSocket->sLlcpHeader.dsap = pLlcpSocket->socket_dSap;
2064 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_DISC;
2065 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap;
2067 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
2068 &pLlcpSocket->sLlcpHeader,
2072 pLlcpSocket->index,
2073 pLlcpSocket->psTransport);
2076 clearSendPending(pLlcpSocket->psTransport);
2078 pLlcpSocket->pfSocketDisconnect_Cb = NULL;
2079 pLlcpSocket->pDisconnectContext = NULL;
2090 phFriNfc_LlcpTransport_Socket_t *pLlcpSocket = (phFriNfc_LlcpTransport_Socket_t*)pContext;
2095 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDefault;
2096 pLlcpSocket->eSocket_Type = phFriNfc_LlcpTransport_eDefaultType;
2097 pLlcpSocket->pContext = NULL;
2098 pLlcpSocket->pSocketErrCb = NULL;
2099 pLlcpSocket->socket_sSap = PHFRINFC_LLCP_SAP_DEFAULT;
2100 pLlcpSocket->socket_dSap = PHFRINFC_LLCP_SAP_DEFAULT;
2101 pLlcpSocket->bSocketRecvPending = FALSE;
2102 pLlcpSocket->bSocketSendPending = FALSE;
2103 pLlcpSocket->bSocketListenPending = FALSE;
2104 pLlcpSocket->bSocketDiscPending = FALSE;
2105 pLlcpSocket->socket_VS = 0;
2106 pLlcpSocket->socket_VSA = 0;
2107 pLlcpSocket->socket_VR = 0;
2108 pLlcpSocket->socket_VRA = 0;
2110 pLlcpSocket->indexRwRead = 0;
2111 pLlcpSocket->indexRwWrite = 0;
2113 phFriNfc_LlcpTransport_ConnectionOriented_Abort(pLlcpSocket);
2115 memset(&pLlcpSocket->sSocketOption, 0x00, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t));
2117 if (pLlcpSocket->sServiceName.buffer != NULL) {
2118 phOsalNfc_FreeMemory(pLlcpSocket->sServiceName.buffer);
2120 pLlcpSocket->sServiceName.buffer = NULL;
2121 pLlcpSocket->sServiceName.length = 0;
2136 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
2143 NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_Close(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket)
2147 if(pLlcpSocket->eSocket_State == phFriNfc_LlcpTransportSocket_eSocketConnected)
2149 status = phLibNfc_LlcpTransport_ConnectionOriented_Disconnect(pLlcpSocket,
2151 pLlcpSocket);
2157 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDefault;
2158 pLlcpSocket->eSocket_Type = phFriNfc_LlcpTransport_eDefaultType;
2159 pLlcpSocket->pContext = NULL;
2160 pLlcpSocket->pSocketErrCb = NULL;
2161 pLlcpSocket->socket_sSap = PHFRINFC_LLCP_SAP_DEFAULT;
2162 pLlcpSocket->socket_dSap = PHFRINFC_LLCP_SAP_DEFAULT;
2163 pLlcpSocket->bSocketRecvPending = FALSE;
2164 pLlcpSocket->bSocketSendPending = FALSE;
2165 pLlcpSocket->bSocketListenPending = FALSE;
2166 pLlcpSocket->bSocketDiscPending = FALSE;
2167 pLlcpSocket->RemoteBusyConditionInfo = FALSE;
2168 pLlcpSocket->ReceiverBusyCondition = FALSE;
2169 pLlcpSocket->socket_VS = 0;
2170 pLlcpSocket->socket_VSA = 0;
2171 pLlcpSocket->socket_VR = 0;
2172 pLlcpSocket->socket_VRA = 0;
2174 pLlcpSocket->indexRwRead = 0;
2175 pLlcpSocket->indexRwWrite = 0;
2177 phFriNfc_LlcpTransport_ConnectionOriented_Abort(pLlcpSocket);
2179 memset(&pLlcpSocket->sSocketOption, 0x00, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t));
2181 if (pLlcpSocket->sServiceName.buffer != NULL) {
2182 phOsalNfc_FreeMemory(pLlcpSocket->sServiceName.buffer);
2184 pLlcpSocket->sServiceName.buffer = NULL;
2185 pLlcpSocket->sServiceName.length = 0;
2200 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
2216 NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_Send(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
2225 if(!CHECK_SEND_RW(pLlcpSocket))
2228 pLlcpSocket->pfSocketSend_Cb = pSend_RspCb;
2229 pLlcpSocket->pSendContext = pContext;
2232 pLlcpSocket->bSocketSendPending = TRUE;
2235 pLlcpSocket->sSocketSendBuffer = *psBuffer;
2243 pLlcpSocket->sSocketSendBuffer = *psBuffer;
2246 pLlcpSocket->pfSocketSend_Cb = pSend_RspCb;
2247 pLlcpSocket->pSendContext = pContext;
2250 if(testAndSetSendPending(pLlcpSocket->psTransport))
2253 pLlcpSocket->bSocketSendPending = TRUE;
2261 pLlcpSocket->pfSocketSend_Cb = pSend_RspCb;
2262 pLlcpSocket->pSendContext = pContext;
2264 status = static_performSendInfo(pLlcpSocket);
2268 clearSendPending(pLlcpSocket->psTransport);
2270 pLlcpSocket->pfSocketSend_Cb = NULL;
2271 pLlcpSocket->pSendContext = NULL;
2291 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
2307 NFCSTATUS phFriNfc_LlcpTransport_ConnectionOriented_Recv( phFriNfc_LlcpTransport_Socket_t* pLlcpSocket,
2320 if(pLlcpSocket->bufferLinearLength == 0)
2322 if (pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketConnected)
2328 if(pLlcpSocket->indexRwRead != pLlcpSocket->indexRwWrite)
2330 if(pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length != 0)
2333 memcpy(psBuffer->buffer,pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].buffer,pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length);
2334 psBuffer->length = pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length;
2339 pLlcpSocket->socket_VR = (pLlcpSocket->socket_VR+1)%16;
2342 pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length = 0;
2345 pLlcpSocket->indexRwRead++;
2354 if(pLlcpSocket->ReceiverBusyCondition == TRUE)
2357 pLlcpSocket->ReceiverBusyCondition = FALSE;
2360 phFriNfc_Llcp_Send_ReceiveReady_Frame(pLlcpSocket);
2366 pLlcpSocket->bSocketRecvPending = TRUE;
2369 pLlcpSocket->sSocketRecvBuffer = psBuffer;
2372 pLlcpSocket->pfSocketRecv_Cb = pRecv_RspCb;
2373 pLlcpSocket->pRecvContext = pContext;
2382 dataLengthStored = phFriNfc_Llcp_CyclicFifoUsage(&pLlcpSocket->sCyclicFifoBuffer);
2392 dataLengthRead = phFriNfc_Llcp_CyclicFifoFifoRead(&pLlcpSocket->sCyclicFifoBuffer,
2399 while(pLlcpSocket->indexRwRead != pLlcpSocket->indexRwWrite)
2402 dataLengthAvailable = phFriNfc_Llcp_CyclicFifoAvailable(&pLlcpSocket->sCyclicFifoBuffer);
2405 if(dataLengthAvailable < pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length)
2411 dataLengthWrite = phFriNfc_Llcp_CyclicFifoWrite(&pLlcpSocket->sCyclicFifoBuffer,
2412 pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].buffer,
2413 pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length);
2415 pLlcpSocket->socket_VR = (pLlcpSocket->socket_VR+1)%16;
2421 pLlcpSocket->sSocketRwBufferTable[(pLlcpSocket->indexRwRead%pLlcpSocket->localRW)].length = 0;
2424 pLlcpSocket->indexRwRead++;
2431 dataLengthAvailable = phFriNfc_Llcp_CyclicFifoAvailable(&pLlcpSocket->sCyclicFifoBuffer);
2432 if((dataLengthAvailable >= pLlcpSocket->sSocketOption.miu) && (pLlcpSocket->ReceiverBusyCondition == TRUE))
2435 pLlcpSocket->ReceiverBusyCondition = FALSE;
2438 phFriNfc_Llcp_Send_ReceiveReady_Frame(pLlcpSocket);
2453 if (pLlcpSocket->eSocket_State != phFriNfc_LlcpTransportSocket_eSocketConnected)
2460 pLlcpSocket->bSocketRecvPending = TRUE;
2463 pLlcpSocket->sSocketRecvBuffer = psBuffer;
2466 pLlcpSocket->pfSocketRecv_Cb = pRecv_RspCb;
2467 pLlcpSocket->pRecvContext = pContext;
2479 pLlcpSocket->pfSocketRecv_Cb = NULL;
2480 pLlcpSocket->pRecvContext = NULL;