• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PH_ASSERT_NULL函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PH_ASSERT_NULL函数的典型用法代码示例。如果您正苦于以下问题:C++ PH_ASSERT_NULL函数的具体用法?C++ PH_ASSERT_NULL怎么用?C++ PH_ASSERT_NULL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PH_ASSERT_NULL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: phalMfc_Sw_Init

phStatus_t phalMfc_Sw_Init(
                           phalMfc_Sw_DataParams_t * pDataParams,
                           uint16_t wSizeOfDataParams, 
                           void * pPalMifareDataParams,
                           void * pKeyStoreDataParams
                           )
{
    if (sizeof(phalMfc_Sw_DataParams_t) != wSizeOfDataParams)
    {
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_MFC);
    }
	PH_ASSERT_NULL (pDataParams);
	PH_ASSERT_NULL (pPalMifareDataParams);

    /* init private data */
    pDataParams->wId                    = PH_COMP_AL_MFC | PHAL_MFC_SW_ID;
    pDataParams->pPalMifareDataParams   = pPalMifareDataParams;
    pDataParams->pKeyStoreDataParams    = pKeyStoreDataParams;

    return PH_ADD_COMPCODE(PH_ERR_SUCCESS, PH_COMP_AL_MFC);
}
开发者ID:VladiPeled,项目名称:NXP-EXPLORE-NFC-CardEmulation,代码行数:21,代码来源:phalMfc_Sw.c


示例2: phnpSnep_Fri_Init

phStatus_t phnpSnep_Fri_Init( phnpSnep_Fri_DataParams_t     *pDataParams,
                              uint16_t                       wSizeOfDataParams,
                              void                          *plnLlcpDataParams
                            )
{
    phlnLlcp_Fri_DataParams_t  *lnLlcpDataparams = (phlnLlcp_Fri_DataParams_t *) plnLlcpDataParams;

    if (sizeof(phnpSnep_Fri_DataParams_t) != wSizeOfDataParams)
    {
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_NP_SNEP);
    }

    PH_ASSERT_NULL (pDataParams);
    PH_ASSERT_NULL (plnLlcpDataParams);

    /* Init. private data */
    pDataParams->wId = PH_COMP_NP_SNEP | PHNP_SNEP_FRI_ID;
    pDataParams->plnLlcpDataParams = plnLlcpDataParams;
    pDataParams->pOsal = lnLlcpDataparams->pLlcp->osal;

    return PH_ERR_SUCCESS;
}
开发者ID:ipskid,项目名称:clev663,代码行数:22,代码来源:phnpSnep_Fri.c


示例3: phalMful_SamAV2_X_Init

phStatus_t phalMful_SamAV2_X_Init(
                                  phalMful_SamAV2_X_DataParams_t * pDataParams,
                                  uint16_t wSizeOfDataParams, 
                                  phhalHw_SamAV2_DataParams_t * pHalSamDataParams,
                                  phpalMifare_SamAV2_X_DataParams_t * pPalMifareDataParams
                                  )
{
    if (sizeof(phalMful_SamAV2_X_DataParams_t) != wSizeOfDataParams)
    {
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_MFUL);
    }
	PH_ASSERT_NULL (pDataParams);
	PH_ASSERT_NULL (pHalSamDataParams);
	PH_ASSERT_NULL (pPalMifareDataParams);

    /* init private data */
    pDataParams->wId                    = PH_COMP_AL_MFUL | PHAL_MFUL_SAMAV2_X_ID;
    pDataParams->pHalSamDataParams      = pHalSamDataParams;
    pDataParams->pPalMifareDataParams   = pPalMifareDataParams;

    return PH_ADD_COMPCODE(PH_ERR_SUCCESS, PH_COMP_AL_MFUL);
}
开发者ID:halilercikan,项目名称:DWMS,代码行数:22,代码来源:phalMful_SamAV2_X.c


示例4: phCidManager_FreeCid

phStatus_t phCidManager_FreeCid(
                                void * pDataParams,
                                uint8_t bCid
                                )
{
   phStatus_t PH_MEMLOC_REM status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phCidManager_FreeCid");
    /*PH_LOG_HELPER_ALLOCATE_PARAMNAME(pDataParams);*/
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(bCid);
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT8(PH_LOG_LOGTYPE_INFO, bCid_log, &bCid);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
	PH_ASSERT_NULL (pDataParams);

    /* Check data parameters */
    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_CIDMANAGER)
    {
        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);
        
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_CIDMANAGER);
    }

    /* perform operation on active layer */
    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PH_CIDMANAGER_SW
    case PH_CIDMANAGER_SW_ID:
        status = phCidManager_Sw_FreeCid((phCidManager_Sw_DataParams_t *)pDataParams, bCid);
        break;
#endif /* NXPBUILD__PH_CIDMANAGER_SW */

#ifdef NXPBUILD__PH_CIDMANAGER_RD710
    case PH_CIDMANAGER_RD710_ID:
        status = phCidManager_Rd710_FreeCid((phCidManager_Rd710_DataParams_t *)pDataParams, bCid);
        break;
#endif /* NXPBUILD__PH_CIDMANAGER_RD710 */

    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_CIDMANAGER);
        break;
    }
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

    return status;
}
开发者ID:halilercikan,项目名称:DWMS,代码行数:51,代码来源:phCidManager.c


示例5: phpalFelica_SetConfig

phStatus_t phpalFelica_SetConfig(
                                 void * pDataParams,
                                 uint16_t wConfig,
                                 uint16_t wValue
                                 )
{
    phStatus_t PH_MEMLOC_REM status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phpalFelica_SetConfig");
    /*PH_LOG_HELPER_ALLOCATE_PARAMNAME(pDataParams);*/
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(wConfig);
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(wValue);
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_DEBUG, wConfig_log, &wConfig);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_DEBUG, wValue_log, &wValue);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
    PH_ASSERT_NULL (pDataParams);

    /* Check data parameters */
    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_PAL_FELICA)
    {
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_PAL_FELICA);

        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

        return status;
    }

    /* perform operation on active layer */
    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PHPAL_FELICA_SW
    case PHPAL_FELICA_SW_ID:
        status = phpalFelica_Sw_SetConfig((phpalFelica_Sw_DataParams_t *)pDataParams, wConfig, wValue);
        break;
#endif /* NXPBUILD__PHPAL_FELICA_SW */

    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_PAL_FELICA);
        break;
    }

    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

    return status;
}
开发者ID:ipskid,项目名称:clev663,代码行数:51,代码来源:phpalFelica.c


示例6: phCryptoRng_Seed

phStatus_t phCryptoRng_Seed(  
                                    void * pDataParams,
                                    uint8_t * pSeed,
                                    uint8_t bSeedLength
                                    )
{
    phStatus_t PH_MEMLOC_REM status;

	PH_ASSERT_NULL (pDataParams);
	if (bSeedLength) PH_ASSERT_NULL (pSeed);

    /* Check data parameters */
    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_CRYPTORNG)
    {
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_CRYPTORNG);
    }

    /* perform operation on active layer */
    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PH_CRYPTORNG_SW
    case PH_CRYPTORNG_SW_ID:
        status = phCryptoRng_Sw_Seed((phCryptoRng_Sw_DataParams_t *)pDataParams,pSeed,bSeedLength);
        break;
#endif /* NXPBUILD__PH_CRYPTORNG_SW */

#ifdef NXPBUILD__PH_CRYPTORNG_STUB
    case PH_CRYPTORNG_STUB_ID:
        status = phCryptoRng_Stub_Seed((phCryptoRng_Stub_DataParams_t *)pDataParams,pSeed,bSeedLength);
        break;
#endif /* NXPBUILD__PH_CRYPTORNG_STUB */
    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_CRYPTORNG);
        break;
    }

    return status;
}
开发者ID:halilercikan,项目名称:DWMS,代码行数:38,代码来源:phCryptoRng.c


示例7: phpalEpcUid_Sw_Init

phStatus_t phpalEpcUid_Sw_Init(
                               phpalEpcUid_Sw_DataParams_t * pDataParams,
                               uint16_t wSizeOfDataParams,
                               void * pHalDataParams
                               )
{
    /* Dataparam check */
    if (sizeof(phpalEpcUid_Sw_DataParams_t) != wSizeOfDataParams)
    {
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_PAL_EPCUID);
    }

    /* Pointer check */
    PH_ASSERT_NULL (pDataParams);
    PH_ASSERT_NULL (pHalDataParams);

    /* init private data */
    pDataParams->wId            = PH_COMP_PAL_EPCUID | PHPAL_EPCUID_SW_ID;
    pDataParams->pHalDataParams = pHalDataParams;
    pDataParams->bUidValid      = PH_OFF;

    return PH_ADD_COMPCODE(PH_ERR_SUCCESS, PH_COMP_PAL_EPCUID);
}
开发者ID:halilercikan,项目名称:DWMS,代码行数:23,代码来源:phpalEpcUid_Sw.c


示例8: phacDiscLoop_SetPtr

phStatus_t phacDiscLoop_SetPtr(
    void * pDataParams,
    void * pI14443p3a,
    void * pI14443p4a,
    void * pI14443p3b,
    void * pFeilca,
    void * pI18092mPI
    
    )
{
    phStatus_t PH_MEMLOC_REM status;
    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phacDiscLoop_SetPtr");
    /*PH_LOG_HELPER_ALLOCATE_PARAMNAME(pDataParams); */
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
    PH_ASSERT_NULL (pDataParams);
    PH_ASSERT_NULL (pI14443p3a);
    PH_ASSERT_NULL (pI14443p4a);
    PH_ASSERT_NULL (pI14443p3b);
    PH_ASSERT_NULL (pFeilca);
    PH_ASSERT_NULL (pI18092mPI);
    
    /* Check data parameters */
    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_AC_DISCLOOP)
    {
        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AC_DISCLOOP);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AC_DISCLOOP);
    }
    
    switch(PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PHAC_DISCLOOP_SW
    case PHAC_DISCLOOP_SW_ID:
        status = phacDiscLoop_Sw_SetPtr(pDataParams,
            pI14443p3a,
            pI14443p4a,
            pI14443p3b,
            pFeilca,
            pI18092mPI
            );
        break;
#endif /* NXPBUILD__PHAC_DISCLOOP_SW */
    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AC_DISCLOOP);
        break;
    }
    
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);
    return status;    
}
开发者ID:idodoyo,项目名称:nxprdlib,代码行数:57,代码来源:phacDiscLoop.c


示例9: phalMfc_RestoreTransfer

phStatus_t phalMfc_RestoreTransfer(
                                   void * pDataParams,
                                   uint8_t bSrcBlockNo,
                                   uint8_t bDstBlockNo
                                   )
{
    phStatus_t PH_MEMLOC_REM status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phalMfc_RestoreTransfer");
    /*PH_LOG_HELPER_ALLOCATE_PARAMNAME(pDataParams);*/
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(bSrcBlockNo);
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(bDstBlockNo);
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT8(PH_LOG_LOGTYPE_DEBUG, bSrcBlockNo_log, &bSrcBlockNo);
    PH_LOG_HELPER_ADDPARAM_UINT8(PH_LOG_LOGTYPE_DEBUG, bDstBlockNo_log, &bDstBlockNo);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
	PH_ASSERT_NULL (pDataParams);

    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_AL_MFC)
    {
        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_MFC);
    }

    /* perform operation on active layer */
    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PHAL_MFC_SW
    case PHAL_MFC_SW_ID:
        status = phalMfc_Sw_RestoreTransfer((phalMfc_Sw_DataParams_t *)pDataParams, bSrcBlockNo, bDstBlockNo);
        break;
#endif /* NXPBUILD__PHAL_MFC_SW */

    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_MFC);
        break;
    }

    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);
    
    return status;
}
开发者ID:liddad,项目名称:DoorEntrySystem,代码行数:48,代码来源:phalMfc.c


示例10: phacDiscLoop_SetConfig

phStatus_t phacDiscLoop_SetConfig(
    void * pDataParams,
    uint16_t wConfig,
    uint16_t wValue
    )
{
    phStatus_t PH_MEMLOC_REM status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phacDiscLoop_SetConfig");
    /*PH_LOG_HELPER_ALLOCATE_PARAMNAME(pDataParams); */
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(wConfig);
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(wValue);
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_DEBUG, wConfig_log, &wConfig);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_DEBUG, wValue_log, &wValue);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
    PH_ASSERT_NULL (pDataParams);


    /* Check data parameters */
    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_AC_DISCLOOP)
    {
        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AC_DISCLOOP);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AC_DISCLOOP);
    }

    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PHAC_DISCLOOP_SW
    case PHAC_DISCLOOP_SW_ID:
        status = phacDiscLoop_Sw_SetConfig(pDataParams, wConfig, wValue);
        break;
#endif /* NXPBUILD__PHAC_DISCLOOP_SW */
    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AC_DISCLOOP);
        break;
    }

    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);
    return status;
}
开发者ID:idodoyo,项目名称:nxprdlib,代码行数:48,代码来源:phacDiscLoop.c


示例11: phnpSnep_Client_DeInit

/* SNEP Client De-Initialization API */
phStatus_t phnpSnep_Client_DeInit( void           *pDataParams,
                                  ph_NfcHandle    ConnHandle
                                  )
{
    phStatus_t status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phnpSnep_Client_DeInit");
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
    PH_ASSERT_NULL (pDataParams);

    status =  phnpSnep_Fri_Client_DeInit( (phnpSnep_Fri_DataParams_t *) pDataParams,
                                          ConnHandle
                                         );
    return status;
}
开发者ID:ipskid,项目名称:clev663,代码行数:17,代码来源:phnpSnep.c


示例12: phnpSnep_Server_DeInit

/* SNEP Server De-Initialization API */
phStatus_t phnpSnep_Server_DeInit ( void           *pDataParams,
                                    ph_NfcHandle    ServerHandle )
{
    phStatus_t status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phnpSnep_Server_DeInit");
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
    PH_ASSERT_NULL (pDataParams);

    /* Check data parameters */
    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_NP_SNEP)
    {
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_NP_SNEP);

        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);
        return status;
    }

    /* perform operation on active layer */
    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PHNP_SNEP_FRI
    case PHNP_SNEP_FRI_ID:

    status = phnpSnep_Fri_Server_DeInit( pDataParams,
                                         ServerHandle );

        break;
#endif /* NXPBUILD__PHNP_SNEP_FRI */

    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_NP_SNEP);
        break;
    }

    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

    return status;
}
开发者ID:ipskid,项目名称:clev663,代码行数:46,代码来源:phnpSnep.c


示例13: phpalI14443p3a_HaltA

phStatus_t phpalI14443p3a_HaltA(
                                void * pDataParams
                                )
{
    phStatus_t PH_MEMLOC_REM status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phpalI14443p3a_HaltA");
    /*PH_LOG_HELPER_ALLOCATE_PARAMNAME(pDataParams);*/
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
	PH_ASSERT_NULL (pDataParams);

    /* Check data parameters */
    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_PAL_ISO14443P3A)
    {
		status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_PAL_ISO14443P3A);

        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

        return status;
    }

    /* perform operation on active layer */
    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PHPAL_I14443P3A_SW
    case PHPAL_I14443P3A_SW_ID:
        status = phpalI14443p3a_Sw_HaltA((phpalI14443p3a_Sw_DataParams_t *)pDataParams);
        break;
#endif /* NXPBUILD__PHPAL_I14443P3A_SW */

    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_PAL_ISO14443P3A);
        break;
    }

    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

    return status;
}
开发者ID:chouyu,项目名称:high-low-frequency-attack-defense-toolkits,代码行数:45,代码来源:phpalI14443p3a.c


示例14: phalSli_LockPWD

phStatus_t phalSli_LockPWD(
                           void * pDataParams,
                           uint8_t bPwdIdentifier
                           )
{
    phStatus_t PH_MEMLOC_REM status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phalSli_LockPWD");
    /*PH_LOG_HELPER_ALLOCATE_PARAMNAME(pDataParams);*/
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(bPwdIdentifier);
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT8(PH_LOG_LOGTYPE_DEBUG, bPwdIdentifier_log, &bPwdIdentifier);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
	PH_ASSERT_NULL (pDataParams);

    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_AL_SLI)
    {
        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);
        
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_SLI);
    }

    /* perform operation on active layer */
    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PHAL_SLI_SW
    case PHAL_SLI_SW_ID:
        status = phalSli_Sw_LockPWD((phalSli_Sw_DataParams_t *)pDataParams, bPwdIdentifier);
        break;
#endif /* NXPBUILD__PHAL_SLI_SW */

    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_SLI);
        break;
    }
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

    return status;
}
开发者ID:halilercikan,项目名称:DWMS,代码行数:44,代码来源:phalSli.c


示例15: phpalMifare_Stub_Init

phStatus_t phpalMifare_Stub_Init(
                                 phpalMifare_Stub_DataParams_t * pDataParams,
                                 uint16_t wSizeOfDataParams
                                 )
{
    if (sizeof(phpalMifare_Stub_DataParams_t) != wSizeOfDataParams)
    {
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_PAL_MIFARE);
    }
	PH_ASSERT_NULL (pDataParams);

    /* init private data */
    pDataParams->wId                 = PH_COMP_PAL_MIFARE | PHPAL_MIFARE_STUB_ID;

    /* TODO: Replace and insert initialisation code here */
    pDataParams = NULL;

    return PH_ADD_COMPCODE(PH_ERR_SUCCESS, PH_COMP_PAL_MIFARE);
}
开发者ID:halilercikan,项目名称:DWMS,代码行数:19,代码来源:phpalMifare_Stub.c


示例16: phhalHw_Callback_Init

phStatus_t phhalHw_Callback_Init(
                                 phhalHw_Callback_DataParams_t * pDataParams,
                                 uint16_t wSizeOfDataParams,
                                 cbExchange pExchangeCb,
                                 cbWriteRegister pWriteRegisterCb,
                                 cbReadRegister pReadRegisterCb,
                                 cbApplyProtocolSettings pApplyProtocolSettingsCb,
                                 cbMfcAuthenticate pMfcAuthenticateCb,
                                 cbMfcAuthenticateKey pMfcAuthenticateKeyCb,
                                 cbSetConfig pSetConfigCb,
                                 cbGetConfig pGetConfigCb,
                                 cbFieldOn pFieldOnCb,
                                 cbFieldOff pFieldOffCb,
                                 cbFieldReset pFieldResetCb,
                                 cbWait pWaitCb,
                                 cbListen pListenCb,
                                 void * pCallbackContext
                                 )
{
    if (sizeof(phhalHw_Callback_DataParams_t) != wSizeOfDataParams)
    {
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_HAL);
    }
	PH_ASSERT_NULL (pDataParams);

    pDataParams->wId                = PH_COMP_HAL | PHHAL_HW_CALLBACK_ID;
    pDataParams->pExchangeCb        = pExchangeCb;
    pDataParams->pWriteRegisterCb   = pWriteRegisterCb;
    pDataParams->pReadRegisterCb    = pReadRegisterCb;
    pDataParams->pApplyProtocolSettingsCb = pApplyProtocolSettingsCb;
    pDataParams->pMfcAuthenticateCb = pMfcAuthenticateCb;
    pDataParams->pMfcAuthenticateKeyCb = pMfcAuthenticateKeyCb;
    pDataParams->pSetConfigCb       = pSetConfigCb;
    pDataParams->pGetConfigCb       = pGetConfigCb;
    pDataParams->pFieldOnCb         = pFieldOnCb;
    pDataParams->pFieldOffCb        = pFieldOffCb;
    pDataParams->pFieldResetCb      = pFieldResetCb;
    pDataParams->pWaitCb            = pWaitCb;
    pDataParams->pCbContext         = pCallbackContext;
    pDataParams->pListenCb          = pListenCb; 

    return PH_ADD_COMPCODE(PH_ERR_SUCCESS, PH_COMP_HAL);
}
开发者ID:ipskid,项目名称:clev663,代码行数:43,代码来源:phhalHw_Callback.c


示例17: phalTop_FormatNdef

phStatus_t phalTop_FormatNdef(
                              void * pDataParams
                              )
{
    phStatus_t PH_MEMLOC_REM status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phalTop_FormatNdef");
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
    PH_ASSERT_NULL (pDataParams);

    /* Check data parameters */
    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_AL_TOP)
    {
        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_TOP);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_TOP);
    }

    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PHAL_TOP_SW
    case PHAL_TOP_SW_ID:
        status = phalTop_Sw_FormatNdef(pDataParams);
        break;
#endif /* NXPBUILD__PHAL_TOP_SW */
    default:
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_TOP);
        break;
    }

    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);
    return status;
}
开发者ID:ipskid,项目名称:clev663,代码行数:40,代码来源:phalTop.c


示例18: phalVca_Sw_Init

phStatus_t phalVca_Sw_Init(
                           phalVca_Sw_DataParams_t * pDataParams,
                           uint16_t wSizeOfDataParams, 
                           void * pPalMifareDataParams,
                           void * pKeyStoreDataParams,
                           void * pCryptoDataParams,
                           void * pCryptoRngDataParams,
                           phalVca_Sw_IidTableEntry_t * pIidTableStorage,
                           uint16_t wNumIidTableStorageEntries,
                           phalVca_Sw_CardTableEntry_t * pCardTableStorage,
                           uint16_t wNumCardTableStorageEntries
                           )
{
    if (sizeof(phalVca_Sw_DataParams_t) != wSizeOfDataParams)
    {
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_VCA);
    }
	PH_ASSERT_NULL (pDataParams);
	PH_ASSERT_NULL (pPalMifareDataParams);
	PH_ASSERT_NULL (pKeyStoreDataParams);
	PH_ASSERT_NULL (pCryptoDataParams);
	PH_ASSERT_NULL (pCryptoRngDataParams);
	if (wNumIidTableStorageEntries) PH_ASSERT_NULL (pIidTableStorage);
	if (wNumCardTableStorageEntries) PH_ASSERT_NULL (pCardTableStorage);

    /* init private data */
    pDataParams->wId                    = PH_COMP_AL_VCA | PHAL_VCA_SW_ID;
    pDataParams->pPalMifareDataParams   = pPalMifareDataParams;
    pDataParams->pKeyStoreDataParams    = pKeyStoreDataParams;
    pDataParams->pCryptoDataParams      = pCryptoDataParams;
    pDataParams->wCurrentCardTablePos   = 0;
    pDataParams->pCardTable             = pCardTableStorage;
    pDataParams->wNumCardTableEntries   = wNumCardTableStorageEntries;
    pDataParams->pIidTable              = pIidTableStorage;
    pDataParams->wCurrentIidTablePos    = 0;
    pDataParams->wNumIidTableEntries    = wNumIidTableStorageEntries;
    pDataParams->pCryptoRngDataParams   = pCryptoRngDataParams;

    return PH_ADD_COMPCODE(PH_ERR_SUCCESS, PH_COMP_AL_VCA);
}
开发者ID:halilercikan,项目名称:DWMS,代码行数:40,代码来源:phalVca_Sw.c


示例19: phacDiscLoop_Start

phStatus_t phacDiscLoop_Start(void * pDataParams)
{
    phStatus_t PH_MEMLOC_REM status;

    PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phacDiscLoop_Start");
    /*PH_LOG_HELPER_ALLOCATE_PARAMNAME(pDataParams);*/
    PH_LOG_HELPER_ALLOCATE_PARAMNAME(status);
    PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
    PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_ENTER);
    PH_ASSERT_NULL (pDataParams);
	
    /* Check data parameters */
    if (PH_GET_COMPCODE(pDataParams) != PH_COMP_AC_DISCLOOP)
    {
        PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName);
        status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AC_DISCLOOP);
        PH_LOG_HELPER_ADDPARAM_UINT16(PH_LOG_LOGTYPE_INFO, status_log, &status);
        PH_LOG_HELPER_EXECUTE(PH_LOG_OPTION_CATEGORY_LEAVE);

        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AC_DISCLOOP);
    }

    /* Select the active layer to perform the action */
    switch (PH_GET_COMPID(pDataParams))
    {
#ifdef NXPBUILD__PHAC_DISCLOOP_SW
        case PHAC_DISCLOOP_SW_ID:
            status = phacDiscLoop_Sw_Start(pDataParams);
            break;
#endif /* NXPBUILD__PHAC_DISCLOOP_SW */
        default:
            status = PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AC_DISCLOOP);
            break;
    }
    return status;
}
开发者ID:idodoyo,项目名称:nxprdlib,代码行数:36,代码来源:phacDiscLoop.c


示例20: phalVca_SamAV2_Init

phStatus_t phalVca_SamAV2_Init(
                               phalVca_SamAV2_DataParams_t * pDataParams,  
                               uint16_t wSizeOfDataParams, 
                               phhalHw_SamAV2_DataParams_t * pSamHal,     
                               void * pPalMifareDataParams,
                               uint8_t * pRndq,
                               phalVca_SamAV2_KeyDuos_t * pKeyDuos,
                               uint8_t bNumKeyDuos,
                               phalVca_SamAV2_CardTableEntry_t * pCardTableStorage,
                               uint16_t wNumCardTableStorageEntries
                               )
{
    if (sizeof(phalVca_SamAV2_DataParams_t) != wSizeOfDataParams)
    {
        return PH_ADD_COMPCODE(PH_ERR_INVALID_DATA_PARAMS, PH_COMP_AL_VCA);
    }
	PH_ASSERT_NULL (pDataParams);
	PH_ASSERT_NULL (pPalMifareDataParams);
	PH_ASSERT_NULL (pSamHal);
	PH_ASSERT_NULL (pRndq);
	PH_ASSERT_NULL (pKeyDuos);
	if (wNumCardTableStorageEntries) PH_ASSERT_NULL (pCardTableStorage);

    /* init private data */
    pDataParams->wId                    = PH_COMP_AL_VCA | PHAL_VCA_SAMAV2_ID;
    pDataParams->pPalMifareDataParams   = pPalMifareDataParams;
    pDataParams->pSamHal                = pSamHal;
    pDataParams->pRndq                  = pRndq;
    pDataParams->pKeyDuos               = pKeyDuos;
    pDataParams->bNumKeyDuos            = bNumKeyDuos;
    pDataParams->wCurrentCardTablePos   = 0;
    pDataParams->pCardTable             = pCardTableStorage;
    pDataParams->wNumCardTableEntries   = wNumCardTableStorageEntries;

    return PH_ADD_COMPCODE(PH_ERR_SUCCESS, PH_COMP_AL_VCA);
}
开发者ID:halilercikan,项目名称:DWMS,代码行数:36,代码来源:phalVca_SamAV2.c



注:本文中的PH_ASSERT_NULL函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PH_CHECK_SUCCESS_FCT函数代码示例发布时间:2022-05-30
下一篇:
C++ PH_ADD_COMPCODE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap