phStatus_t phalMfc_Sw_RestoreTransfer( phalMfc_Sw_DataParams_t * pDataParams, uint8_t bSrcBlockNo, uint8_t bDstBlockNo ) { phStatus_t PH_MEMLOC_REM statusTmp; PH_CHECK_SUCCESS_FCT(statusTmp, phalMfc_Sw_Restore(pDataParams, bSrcBlockNo)); PH_CHECK_SUCCESS_FCT(statusTmp, phalMfc_Sw_Transfer(pDataParams, bDstBlockNo)); return PH_ADD_COMPCODE(PH_ERR_SUCCESS, PH_COMP_AL_MFC); }
phStatus_t phalMfc_Restore( void * pDataParams, uint8_t bBlockNo ) { phStatus_t PH_MEMLOC_REM status; PH_LOG_HELPER_ALLOCATE_TEXT(bFunctionName, "phalMfc_Restore"); /*PH_LOG_HELPER_ALLOCATE_PARAMNAME(pDataParams);*/ PH_LOG_HELPER_ALLOCATE_PARAMNAME(bBlockNo); PH_LOG_HELPER_ALLOCATE_PARAMNAME(status); PH_LOG_HELPER_ADDSTRING(PH_LOG_LOGTYPE_INFO, bFunctionName); PH_LOG_HELPER_ADDPARAM_UINT8(PH_LOG_LOGTYPE_DEBUG, bBlockNo_log, &bBlockNo); 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_Restore((phalMfc_Sw_DataParams_t *)pDataParams, bBlockNo); 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; }