Lines Matching refs:nxpncihal_ctrl
43 phNxpNciHal_Control_t nxpncihal_ctrl; variable
152 if (nxpncihal_ctrl.p_nfc_stack_cback != NULL) in phNxpNciHal_client_thread()
155 (*nxpncihal_ctrl.p_nfc_stack_cback)(HAL_NFC_OPEN_CPLT_EVT, in phNxpNciHal_client_thread()
165 if (nxpncihal_ctrl.p_nfc_stack_cback != NULL) in phNxpNciHal_client_thread()
168 (*nxpncihal_ctrl.p_nfc_stack_cback)(HAL_NFC_CLOSE_CPLT_EVT, in phNxpNciHal_client_thread()
170 phNxpNciHal_kill_client_thread(&nxpncihal_ctrl); in phNxpNciHal_client_thread()
179 if (nxpncihal_ctrl.p_nfc_stack_cback != NULL) in phNxpNciHal_client_thread()
182 (*nxpncihal_ctrl.p_nfc_stack_cback)(HAL_NFC_POST_INIT_CPLT_EVT, in phNxpNciHal_client_thread()
192 if (nxpncihal_ctrl.p_nfc_stack_cback != NULL) in phNxpNciHal_client_thread()
195 (*nxpncihal_ctrl.p_nfc_stack_cback)( in phNxpNciHal_client_thread()
205 if (nxpncihal_ctrl.p_nfc_stack_cback != NULL) in phNxpNciHal_client_thread()
208 (*nxpncihal_ctrl.p_nfc_stack_cback)(HAL_NFC_ERROR_EVT, in phNxpNciHal_client_thread()
218 if (nxpncihal_ctrl.p_nfc_stack_data_cback != NULL) in phNxpNciHal_client_thread()
220 (*nxpncihal_ctrl.p_nfc_stack_data_cback)( in phNxpNciHal_client_thread()
221 nxpncihal_ctrl.rsp_len, nxpncihal_ctrl.p_rsp_data); in phNxpNciHal_client_thread()
460 memset(&nxpncihal_ctrl, 0x00, sizeof(nxpncihal_ctrl)); in phNxpNciHal_open()
466 nxpncihal_ctrl.halStatus = HAL_STATUS_OPEN; in phNxpNciHal_open()
468 nxpncihal_ctrl.p_nfc_stack_cback = p_cback; in phNxpNciHal_open()
469 nxpncihal_ctrl.p_nfc_stack_data_cback = p_data_cback; in phNxpNciHal_open()
472 nxpncihal_ctrl.gDrvCfg.nClientId = phDal4Nfc_msgget(0, 0600); in phNxpNciHal_open()
473 nxpncihal_ctrl.gDrvCfg.nLinkType = ENUM_LINK_TYPE_I2C;/* For PN54X */ in phNxpNciHal_open()
476 = (uintptr_t) nxpncihal_ctrl.gDrvCfg.nClientId; in phNxpNciHal_open()
478 tTmlConfig.dwGetMsgThreadId = (uintptr_t) nxpncihal_ctrl.gDrvCfg.nClientId; in phNxpNciHal_open()
495 if (pthread_create(&nxpncihal_ctrl.client_thread, &attr, in phNxpNciHal_open()
496 phNxpNciHal_client_thread, &nxpncihal_ctrl) != 0) in phNxpNciHal_open()
507 nxpncihal_ctrl.p_cmd_data, in phNxpNciHal_open()
524 if((status != NFCSTATUS_SUCCESS) && (nxpncihal_ctrl.retry_cnt >= MAX_RETRY_COUNT)) in phNxpNciHal_open()
590 nxpncihal_ctrl.p_cmd_data, in phNxpNciHal_open()
617 (*nxpncihal_ctrl.p_nfc_stack_cback)(HAL_NFC_OPEN_CPLT_EVT, in phNxpNciHal_open()
620 nxpncihal_ctrl.p_nfc_stack_cback = NULL; in phNxpNciHal_open()
621 nxpncihal_ctrl.p_nfc_stack_data_cback = NULL; in phNxpNciHal_open()
623 nxpncihal_ctrl.halStatus = HAL_STATUS_CLOSE; in phNxpNciHal_open()
643 nxpncihal_ctrl.hal_open_status = TRUE; in phNxpNciHal_open_complete()
677 memcpy(nxpncihal_ctrl.p_cmd_data, p_data, data_len); in phNxpNciHal_write()
678 nxpncihal_ctrl.cmd_len = data_len; in phNxpNciHal_write()
705 status = phNxpNciHal_write_ext(&nxpncihal_ctrl.cmd_len, in phNxpNciHal_write()
706 nxpncihal_ctrl.p_cmd_data, &nxpncihal_ctrl.rsp_len, in phNxpNciHal_write()
707 nxpncihal_ctrl.p_rsp_data); in phNxpNciHal_write()
721 data_len = phNxpNciHal_write_unlocked(nxpncihal_ctrl.cmd_len, in phNxpNciHal_write()
722 nxpncihal_ctrl.p_cmd_data); in phNxpNciHal_write()
752 nxpncihal_ctrl.retry_cnt = 0; in phNxpNciHal_write_unlocked()
764 memcpy(nxpncihal_ctrl.p_cmd_data, p_data, data_len); in phNxpNciHal_write_unlocked()
765 nxpncihal_ctrl.cmd_len = data_len; in phNxpNciHal_write_unlocked()
769 data_len = nxpncihal_ctrl.cmd_len; in phNxpNciHal_write_unlocked()
771 status = phTmlNfc_Write( (uint8_t *) nxpncihal_ctrl.p_cmd_data, in phNxpNciHal_write_unlocked()
772 (uint16_t) nxpncihal_ctrl.cmd_len, in phNxpNciHal_write_unlocked()
793 if(nxpncihal_ctrl.retry_cnt++ < MAX_RETRY_COUNT) in phNxpNciHal_write_unlocked()
803 …write_unlocked failed - PN54X Maybe in Standby Mode (max count = 0x%x)", nxpncihal_ctrl.retry_cnt); in phNxpNciHal_write_unlocked()
815 if (nxpncihal_ctrl.p_nfc_stack_data_cback!= NULL && in phNxpNciHal_write_unlocked()
816 nxpncihal_ctrl.p_rx_data!= NULL && in phNxpNciHal_write_unlocked()
817 nxpncihal_ctrl.hal_open_status == TRUE) in phNxpNciHal_write_unlocked()
821 nxpncihal_ctrl.rx_data_len = sizeof(reset_ntf); in phNxpNciHal_write_unlocked()
822 memcpy(nxpncihal_ctrl.p_rx_data, reset_ntf, sizeof(reset_ntf)); in phNxpNciHal_write_unlocked()
823 … (*nxpncihal_ctrl.p_nfc_stack_data_cback)(nxpncihal_ctrl.rx_data_len, nxpncihal_ctrl.p_rx_data); in phNxpNciHal_write_unlocked()
879 if(nxpncihal_ctrl.read_retry_cnt == 1) in phNxpNciHal_read_complete()
881 nxpncihal_ctrl.read_retry_cnt = 0; in phNxpNciHal_read_complete()
888 nxpncihal_ctrl.p_rx_data = pInfo->pBuff; in phNxpNciHal_read_complete()
889 nxpncihal_ctrl.rx_data_len = pInfo->wLength; in phNxpNciHal_read_complete()
891 … status = phNxpNciHal_process_ext_rsp (nxpncihal_ctrl.p_rx_data, &nxpncihal_ctrl.rx_data_len); in phNxpNciHal_read_complete()
893 phNxpNciHal_print_res_status(nxpncihal_ctrl.p_rx_data, &nxpncihal_ctrl.rx_data_len); in phNxpNciHal_read_complete()
895 if (nxpncihal_ctrl.hal_ext_enabled == 1 in phNxpNciHal_read_complete()
896 && (nxpncihal_ctrl.p_rx_data[0x00] & 0x40) == 0x40) in phNxpNciHal_read_complete()
901 nxpncihal_ctrl.ext_cb_data.status = status; in phNxpNciHal_read_complete()
904 SEM_POST(&(nxpncihal_ctrl.ext_cb_data)); in phNxpNciHal_read_complete()
907 else if ((nxpncihal_ctrl.p_nfc_stack_data_cback != NULL) && in phNxpNciHal_read_complete()
910 (*nxpncihal_ctrl.p_nfc_stack_data_cback)( in phNxpNciHal_read_complete()
911 nxpncihal_ctrl.rx_data_len, nxpncihal_ctrl.p_rx_data); in phNxpNciHal_read_complete()
919 if(nxpncihal_ctrl.halStatus == HAL_STATUS_CLOSE) in phNxpNciHal_read_complete()
1014 if((status != NFCSTATUS_SUCCESS) && (nxpncihal_ctrl.retry_cnt >= MAX_RETRY_COUNT)) in phNxpNciHal_core_initialized()
1661 (uint8_t *)&p_core_init_rsp_params[36], &nxpncihal_ctrl.rsp_len, in phNxpNciHal_core_initialized()
1662 nxpncihal_ctrl.p_rsp_data); in phNxpNciHal_core_initialized()
1707 if (nxpncihal_ctrl.p_nfc_stack_data_cback != NULL) in phNxpNciHal_core_initialized()
1711 (*nxpncihal_ctrl.p_nfc_stack_data_cback)( in phNxpNciHal_core_initialized()
1712 nxpncihal_ctrl.rx_data_len, nxpncihal_ctrl.p_rx_data); in phNxpNciHal_core_initialized()
1740 if ((nxpncihal_ctrl.rx_data_len > 0) && (nxpncihal_ctrl.p_rx_data[2] > 0)) in phNxpNciHal_CheckRFCmdRespStatus()
1742 if (nxpncihal_ctrl.p_rx_data[3] == 0x09) in phNxpNciHal_CheckRFCmdRespStatus()
1746 else if (nxpncihal_ctrl.p_rx_data[3] != NFCSTATUS_SUCCESS) in phNxpNciHal_CheckRFCmdRespStatus()
1790 nxpncihal_ctrl.p_cmd_data, in phNxpNciHalRFConfigCmdRecSequence()
1918 nxpncihal_ctrl.halStatus = HAL_STATUS_CLOSE; in phNxpNciHal_close()
1937 phDal4Nfc_msgrelease(nxpncihal_ctrl.gDrvCfg.nClientId); in phNxpNciHal_close()
1940 memset (&nxpncihal_ctrl, 0x00, sizeof (nxpncihal_ctrl)); in phNxpNciHal_close()
1993 if (nxpncihal_ctrl.p_nfc_stack_cback != NULL) in phNxpNciHal_notify_i2c_fragmentation()
1996 (*nxpncihal_ctrl.p_nfc_stack_cback)(HAL_NFC_ENABLE_I2C_FRAGMENTATION_EVT, in phNxpNciHal_notify_i2c_fragmentation()
2015 if(NULL != nxpncihal_ctrl.p_control_granted_cback) in phNxpNciHal_control_granted()
2017 (*nxpncihal_ctrl.p_control_granted_cback)(); in phNxpNciHal_control_granted()
2038 if (nxpncihal_ctrl.p_nfc_stack_cback != NULL) in phNxpNciHal_request_control()
2041 (*nxpncihal_ctrl.p_nfc_stack_cback)(HAL_NFC_REQUEST_CONTROL_EVT, in phNxpNciHal_request_control()
2059 if (nxpncihal_ctrl.p_nfc_stack_cback != NULL) in phNxpNciHal_release_control()
2062 (*nxpncihal_ctrl.p_nfc_stack_cback)(HAL_NFC_RELEASE_CONTROL_EVT, in phNxpNciHal_release_control()
2488 if(nxpncihal_ctrl.p_rx_data[8] == 0x10) in phNxpNciHal_enable_i2c_fragmentation()
2494 else if(nxpncihal_ctrl.p_rx_data[8] == 0x00) in phNxpNciHal_enable_i2c_fragmentation()
2709 if ((status != NFCSTATUS_SUCCESS) && (nxpncihal_ctrl.retry_cnt >= MAX_RETRY_COUNT)) in phNxpNciHal_core_reset_recovery()