Home | History | Annotate | Download | only in src

Lines Matching refs:psHciContext

136                                 phHciNfc_sContext_t     *psHciContext,
150 phHciNfc_sContext_t *psHciContext,
163 phHciNfc_sContext_t *psHciContext,
176 phHciNfc_sContext_t *psHciContext,
190 phHciNfc_sContext_t *psHciContext,
228 * \param[in] psHciContext psHciContext is the context of
249 phHciNfc_sContext_t *psHciContext,
516 phHciNfc_sContext_t *psHciContext,
521 &(psHciContext->lower_interface);
557 phHciNfc_sContext_t *psHciContext= (phHciNfc_sContext_t *)psContext;
560 phNfc_sLowerIF_t *plower_if = &(psHciContext->lower_interface);
568 (psHciContext->response_pending)?"TRUE":"FALSE");
570 /* psHciContext->hci_transact_state = NFC_TRANSACT_SEND_IN_PROGRESS; */
575 (TRUE != psHciContext->tx_hcp_chaining)
576 && (TRUE == psHciContext->response_pending)
615 phHciNfc_sContext_t *psHciContext= (phHciNfc_sContext_t *)psContext;
619 if(NULL == psHciContext )
625 plower_if = &(psHciContext->lower_interface);
631 /* psHciContext->hci_transact_state = NFC_TRANSACT_RECV_IN_PROGRESS; */
649 phHciNfc_sContext_t *psHciContext,
655 psHciContext->send_buffer;
657 uint16_t tx_length = psHciContext->tx_total - 1 ;
668 tx_data = &psHciContext->tx_packet;
674 psHciContext->tx_remain = tx_length;
675 psHciContext->tx_hcp_frgmnt_index = HCP_ZERO_LEN ;
678 psHciContext->tx_hcp_frgmnt_index++;
679 psHciContext->tx_hcp_chaining = TRUE ;
682 else if ( psHciContext->tx_remain > PHHCINFC_MAX_PACKET_DATA )
691 tx_length = psHciContext->tx_remain ;
692 psHciContext->tx_hcp_chaining = FALSE ;
699 (&psHciContext->send_buffer[psHciContext->tx_hcp_frgmnt_index])
707 psHciContext->tx_hcp_chaining = FALSE ;
709 psHciContext->tx_remain = tx_length ;
715 status = phHciNfc_Send ( (void *) psHciContext, pHwRef,
731 phHciNfc_sContext_t *psHciContext,
749 hcp_index = psHciContext->rx_hcp_frgmnt_index;
753 /* pdata = (uint8_t *)&psHciContext->rx_packet; */
760 psHciContext->recv_buffer, hcp_index,
763 psHciContext->rx_hcp_frgmnt_index =(uint16_t)
769 psHciContext->rx_hcp_chaining = TRUE ;
771 phHciNfc_Append_HCPFrame(psHciContext->recv_buffer,
773 psHciContext->rx_hcp_frgmnt_index = ( hcp_index + length ) ;
776 status = phHciNfc_Receive ( (void *) psHciContext, pHwRef,
781 if(TRUE == psHciContext->rx_hcp_chaining)
784 psHciContext->rx_hcp_chaining = FALSE ;
787 psHciContext->recv_buffer, hcp_index,
791 psHciContext->rx_total =
793 psHciContext->rx_hcp_frgmnt_index = FALSE ;
797 (void) memcpy( psHciContext->recv_buffer, pdata, length);
799 psHciContext->rx_total = (hcp_index + length);
818 phHciNfc_sContext_t *psHciContext,
841 status = phHciNfc_Receive_HCP( psHciContext, pHwRef, pdata, length );
846 packet = (phHciNfc_HCP_Packet_t *)psHciContext->recv_buffer;
851 psHciContext->rx_total ;
860 status = phHciNfc_Process_Response( psHciContext,
866 status = phHciNfc_Process_Event( psHciContext,
873 status = phHciNfc_Process_Command( psHciContext,
892 phHciNfc_sContext_t *psHciContext,
936 && ( ADM_CLEAR_ALL_PIPE != (psHciContext->p_pipe_list[pipe_id])->prev_msg ))
939 status = phHciNfc_Error_Response( psHciContext, pHwRef, pdata, length );
943 p_pipe_info = psHciContext->p_pipe_list[pipe_id];
949 status = psHciContext->p_pipe_list[pipe_id]->recv_resp( psHciContext,
957 psHciContext->response_pending = FALSE ;
962 phHciNfc_Reset_Pipe_MsgInfo(psHciContext->p_pipe_list[pipe_id]);
963 status = phHciNfc_Resume_Sequence(psHciContext, pHwRef);
979 phHciNfc_sContext_t *psHciContext,
1021 phHciNfc_Error_Sequence(psHciContext, pHwRef, status , pdata, length );
1023 psHciContext->response_pending = FALSE ;
1040 psHciContext->response_pending = FALSE ;
1043 phHciNfc_Reset_Pipe_MsgInfo(psHciContext->p_pipe_list[pipe_id]);
1044 phHciNfc_Error_Sequence(psHciContext, pHwRef, status , pdata, (uint8_t) length );
1056 phHciNfc_sContext_t *psHciContext,
1090 p_pipe_info = psHciContext->p_pipe_list[pipe_id];
1097 status = p_pipe_info->recv_event( psHciContext, pHwRef,
1116 (psHciContext->response_pending)?"TRUE":"FALSE");
1118 (psHciContext->event_pending)?"TRUE":"FALSE");
1120 if ((TRUE == psHciContext->response_pending)
1121 || (TRUE == psHciContext->event_pending))
1123 (void)memset(psHciContext->recv_buffer,
1125 (void)memset((void *)&psHciContext->rx_packet,
1129 psHciContext->rx_index = ZERO;
1131 psHciContext->rx_total = ZERO;
1133 /* psHciContext->hci_transact_state = NFC_TRANSACT_SEND_COMPLETE;*/
1136 status = phHciNfc_Receive( psHciContext, pHwRef,
1137 (uint8_t *)(&psHciContext->rx_packet),
1152 ((FALSE == psHciContext->event_pending )
1157 /* phHciNfc_Reset_Pipe_MsgInfo(psHciContext->p_pipe_list[pipe_id]); */
1158 status = phHciNfc_Resume_Sequence(psHciContext, pHwRef);
1174 phHciNfc_sContext_t *psHciContext,
1208 p_pipe_info = psHciContext->p_pipe_list[pipe_id];
1216 status = p_pipe_info->recv_cmd( psHciContext, pHwRef,
1234 (psHciContext->response_pending)?"TRUE":"FALSE");
1237 && (TRUE != psHciContext->response_pending)
1241 /* phHciNfc_Reset_Pipe_MsgInfo(psHciContext->p_pipe_list[pipe_id]); */
1243 status = phHciNfc_Resume_Sequence(psHciContext, pHwRef);
1321 /* phHciNfc_sContext_t *psHciContext, */
1352 phHciNfc_sContext_t *psHciContext,
1365 if((NULL == psHciContext)
1367 ||(NULL == psHciContext->p_pipe_list[pipe_id])
1377 psHciContext->p_pipe_list[pipe_id];
1378 psHciContext->tx_total = 0 ;
1385 hcp_packet = (phHciNfc_HCP_Packet_t *) psHciContext->send_buffer;
1400 hcp_packet = (phHciNfc_HCP_Packet_t *) psHciContext->send_buffer;
1413 hcp_packet = (phHciNfc_HCP_Packet_t *) psHciContext->send_buffer;
1430 psHciContext->tx_total = length;
1431 psHciContext->response_pending = TRUE ;
1433 status = phHciNfc_Send_HCP( psHciContext, pHwRef );
1450 phHciNfc_sContext_t *psHciContext,
1472 status = phHciNfc_Send_Generic_Cmd( psHciContext, pHwRef,
1491 phHciNfc_sContext_t *psHciContext,
1520 phHciNfc_sContext_t *psHciContext = (phHciNfc_sContext_t *)psContext;
1528 (void)memset(psHciContext->send_buffer,
1530 /* psHciContext->hci_transact_state = NFC_TRANSACT_COMPLETE;*/
1531 phHciNfc_Error_Sequence( psHciContext, pHwRef, status, NULL, 0 );
1539 if( (TRUE == psHciContext->tx_hcp_chaining)
1540 &&( psHciContext->tx_remain > HCP_ZERO_LEN ))
1543 psHciContext->tx_remain -= length - 1;
1546 psHciContext->tx_hcp_frgmnt_index += length - 1;
1549 status = phHciNfc_Send_HCP( psHciContext, pHwRef );
1557 phHciNfc_Error_Sequence( psHciContext, pHwRef, status, NULL, 0 );
1562 psHciContext->tx_total = HCP_ZERO_LEN ;
1563 psHciContext->tx_remain = HCP_ZERO_LEN ;
1564 psHciContext->tx_hcp_frgmnt_index = HCP_ZERO_LEN ;
1567 (psHciContext->response_pending)?"TRUE":"FALSE",
1568 (psHciContext->event_pending)?"TRUE":"FALSE"
1570 if ((TRUE == psHciContext->response_pending)
1571 || (TRUE == psHciContext->event_pending))
1573 (void) memset(psHciContext->recv_buffer,
1575 (void) memset((void *)&psHciContext->rx_packet,
1579 psHciContext->rx_index = ZERO;
1581 psHciContext->rx_total = ZERO;
1583 /* psHciContext->hci_transact_state = NFC_TRANSACT_SEND_COMPLETE;*/
1585 status = phHciNfc_Receive( psHciContext, pHwRef,
1586 (uint8_t *)(&psHciContext->rx_packet),
1596 phHciNfc_Error_Sequence( psHciContext, pHwRef, status, NULL, 0 );
1601 status = phHciNfc_Resume_Sequence(psHciContext, pHwRef );
1628 phHciNfc_sContext_t *psHciContext = (phHciNfc_sContext_t *)psContext;
1637 /* psHciContext->hci_transact_state = NFC_TRANSACT_COMPLETE; */
1638 phHciNfc_Error_Sequence(psHciContext, pHwRef, status , pdata, (uint8_t)length );
1643 /* psHciContext->hci_transact_state = NFC_TRANSACT_RECV_COMPLETE; */
1644 status = phHciNfc_Process_HCP( psHciContext, pHwRef, pdata,(uint8_t) length );
1649 phHciNfc_Error_Sequence(psHciContext, pHwRef, status , pdata, (uint8_t) length );
1675 phHciNfc_sContext_t *psHciContext,
1683 pphNfcIF_Notification_CB_t p_upper_notify = psHciContext->p_upper_notify;
1684 void *pcontext = psHciContext->p_upper_context;
1687 switch( psHciContext->hci_state.next_state )
1692 phHciNfc_FSM_Rollback(psHciContext);
1697 status = phHciNfc_FSM_Complete(psHciContext);
1703 phHciNfc_FSM_Rollback(psHciContext);
1717 phHciNfc_Error_Sequence( psHciContext, pHwRef, status, NULL, 0 );
1724 phHciNfc_sContext_t *psHciContext,
1732 pphNfcIF_Notification_CB_t p_upper_notify = psHciContext->p_upper_notify;
1733 void *pcontext = psHciContext->p_upper_context;
1736 switch( psHciContext->hci_state.next_state )
1741 status = phHciNfc_FSM_Complete(psHciContext);
1746 status = phHciNfc_FSM_Complete(psHciContext);
1752 phHciNfc_FSM_Rollback(psHciContext);
1766 phHciNfc_Error_Sequence( psHciContext, pHwRef, status, NULL, 0 );
1776 phHciNfc_sContext_t *psHciContext,
1784 pphNfcIF_Notification_CB_t p_upper_notify = psHciContext->p_upper_notify;
1785 void *pcontext = psHciContext->p_upper_context;
1786 phHciNfc_Release_Resources( &psHciContext );
1808 phHciNfc_sContext_t *psHciContext = (phHciNfc_sContext_t *)psContext;
1833 gpsHciContext = psHciContext;
1843 phHciNfc_Notify(psHciContext->p_upper_notify,
1844 psHciContext->p_upper_context, pHwRef,
1878 /* psHciContext->hci_seq = PL_DURATION_SEQ; */
1879 if ( hciState_Unknown == psHciContext->hci_state.next_state )
1882 status = phHciNfc_FSM_Update ( psHciContext, hciState_Select );
1888 psHciContext, pHwRef, phHal_eISO14443_A_PICC, FALSE);
1895 psHciContext, pHwRef, phHal_eISO14443_A_PICC, FALSE); */
1896 psHciContext->target_release = TRUE;
1919 if (((TRUE == psHciContext->event_pending) ||
1921 && ( hciState_Transact == psHciContext->hci_state.next_state))
1924 phHciNfc_FSM_Rollback(psHciContext);
1926 psHciContext->event_pending = FALSE;
1927 phHciNfc_Notify(psHciContext->p_upper_notify,
1928 psHciContext->p_upper_context, pHwRef,
1935 if ( hciState_Unknown == psHciContext->hci_state.next_state )
1937 switch (psHciContext->host_rf_type)
1960 status = phHciNfc_FSM_Update ( psHciContext, hciState_Listen );
1971 if ( hciState_Unknown == psHciContext->hci_state.next_state )
1973 status = phHciNfc_FSM_Update ( psHciContext, hciState_Initialise );
1977 status = phHciNfc_FSM_Complete(psHciContext);
1988 psHciContext, INFO_SEQ );
1990 if(( hciState_Listen == psHciContext->hci_state.next_state)
1991 || (hciState_Transact == psHciContext->hci_state.next_state))
1993 psHciContext->hci_state.next_state = hciState_Initialise;
1995 status = phHciNfc_FSM_Complete(psHciContext);
1998 psHciContext->event_pending = FALSE;
1999 phHciNfc_Notify(psHciContext->p_upper_notify,
2000 psHciContext->p_upper_context, pHwRef,
2026 phHciNfc_Notify(psHciContext->p_upper_notify,
2027 psHciContext->p_upper_context, pHwRef,
2052 phHciNfc_Error_Sequence( psHciContext, pHwRef,