void phNxpNciHal_TestMode_close () { NFCSTATUS status = NFCSTATUS_SUCCESS; CONCURRENCY_LOCK(); if (NULL != gpphTmlNfc_Context->pDevHandle) { /* Abort any pending read and write */ status = phTmlNfc_ReadAbort(); status = phTmlNfc_WriteAbort(); phOsalNfc_Timer_Cleanup(); status = phTmlNfc_Shutdown(); NXPLOG_NCIHAL_D("phNxpNciHal_close return status = %d", status); thread_running = 0; phDal4Nfc_msgrelease(gDrvCfg.nClientId); status = phOsalNfc_Timer_Delete(timeoutTimerId); } CONCURRENCY_UNLOCK(); phNxpNciHal_cleanup_monitor(); /* Return success always */ return; }
static NFCSTATUS phNciNfc_ResetNtfCb(void* pContext, void *pInfo, NFCSTATUS status) { pphNciNfc_Context_t pNciCtx = (pphNciNfc_Context_t )pContext; pphNciNfc_TransactInfo_t pTransInfo = pInfo; NFCSTATUS wStatus; wStatus = status; PH_LOG_NCI_FUNC_ENTRY(); if((NULL != pNciCtx) && (NULL != pTransInfo)) { /* Reset notification received, take necessary action */ PH_LOG_NCI_INFO_STR("Received RESET notification from NFCC"); /* Reset Sender statemachine */ (void )phNciNfc_CoreResetSenderStateMachine(&pNciCtx->NciCoreContext); (void )phTmlNfc_WriteAbort(pNciCtx->NciCoreContext.pHwRef); if(NULL != pNciCtx->tRegListInfo.pResetNtfCb) { pNciCtx->tRegListInfo.pResetNtfCb(pNciCtx->tRegListInfo.ResetNtfCtxt, eNciNfc_NciResetNtf,NULL,NFCSTATUS_SUCCESS); } } PH_LOG_NCI_FUNC_EXIT(); return wStatus; }