本文整理汇总了C++中NV_Read函数的典型用法代码示例。如果您正苦于以下问题:C++ NV_Read函数的具体用法?C++ NV_Read怎么用?C++ NV_Read使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NV_Read函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TAF_APS_ReadDsflowRateConfigFromNv
VOS_VOID TAF_APS_ReadDsflowRateConfigFromNv(TAF_APS_SWITCH_DDR_RATE_INFO_STRU *pstSwitchDdrInfo)
{
TAF_NV_DFS_DSFLOW_RATE_CONFIG_STRU stRateConfig;
TAF_NV_MULTI_DFS_DSFLOW_RATE_CONFIG_STRU stMultiDfsConfig;
VOS_UINT32 ulIndex;
PS_MEM_SET(&stRateConfig, 0, sizeof(TAF_NV_DFS_DSFLOW_RATE_CONFIG_STRU));
PS_MEM_SET(&stMultiDfsConfig, 0, sizeof(TAF_NV_MULTI_DFS_DSFLOW_RATE_CONFIG_STRU));
/* 从NV中读取流速配置NV项 */
if (NV_OK != NV_Read (en_NV_Item_Dfs_Dsflow_Rate_Config,
&stRateConfig, sizeof(TAF_NV_DFS_DSFLOW_RATE_CONFIG_STRU)))
{
TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_ReadDsflowRateConfigFromNv(): NV_Read en_NV_Item_Dsflow_Rate_Config Error");
return;
}
if (NV_OK != NV_Read (en_NV_Item_Multi_Dfs_Dsflow_Rate_CFG,
&stMultiDfsConfig, sizeof(TAF_NV_MULTI_DFS_DSFLOW_RATE_CONFIG_STRU)))
{
TAF_ERROR_LOG(WUEPS_PID_TAF, "TAF_APS_ReadDsflowRateConfigFromNv(): NV_Read en_NV_Item_Multi_Dfs_Dsflow_Rate_CFG Error");
return;
}
if (0 == stMultiDfsConfig.astDfsConfig[0].ulProfileNum)
{
if (0 == stRateConfig.ulProfileNum)
{
PS_MEM_SET((VOS_VOID *)pstSwitchDdrInfo->astDfsConfig, 0, sizeof(TAF_NV_DFS_DSFLOW_RATE_CONFIG_STRU) * TAF_NVIM_DIFF_DFS_NUM);
return;
}
pstSwitchDdrInfo->ulMultiDfsFlg = VOS_FALSE;
TAF_APS_Recorrect_ProfileNum(&stRateConfig, 1);
PS_MEM_CPY(&pstSwitchDdrInfo->astDfsConfig[0], &stRateConfig, sizeof(TAF_NV_DFS_DSFLOW_RATE_CONFIG_STRU));
}
else
{
pstSwitchDdrInfo->ulMultiDfsFlg = VOS_TRUE;
TAF_APS_Recorrect_ProfileNum(stMultiDfsConfig.astDfsConfig, TAF_NVIM_DIFF_DFS_NUM);
PS_MEM_CPY((VOS_VOID *)pstSwitchDdrInfo->astDfsConfig, (VOS_VOID *)stMultiDfsConfig.astDfsConfig, sizeof(TAF_NV_MULTI_DFS_DSFLOW_RATE_CONFIG_STRU));
}
/* NV的第一个profile存的是最小的ddr频率 */
pstSwitchDdrInfo->ulMinBand = pstSwitchDdrInfo->astDfsConfig[0].astProfile[0].ulDdrBand;
/* NV的最后一个profile存的是最大的ddr频率 */
ulIndex = pstSwitchDdrInfo->astDfsConfig[0].ulProfileNum - 1;
pstSwitchDdrInfo->ulMaxBand = pstSwitchDdrInfo->astDfsConfig[0].astProfile[ulIndex].ulDdrBand;
return;
}
示例2: TAF_MMA_ReadRfAutoTestFlagNvim
VOS_VOID TAF_MMA_ReadRfAutoTestFlagNvim(VOS_VOID)
{
VOS_UINT32 ulDataLen;
VOS_UINT32 ulAutoSwitchOnFlg;
ulAutoSwitchOnFlg = MMA_RF_AUTO_TEST_DISABLE;
ulDataLen = sizeof(VOS_UINT16);
if (NV_OK != NV_Read(en_NV_Item_RF_Auto_Test_Flag,
(VOS_VOID*)(&(ulAutoSwitchOnFlg)),
ulDataLen))
{
TAF_MMA_SetAutoSwitchOnFlg(MMA_RF_AUTO_TEST_ENABLE);
return;
}
TAF_MMA_SetAutoSwitchOnFlg(ulAutoSwitchOnFlg);
#if 0
#ifdef NAS_STUB
TAF_MMA_SetAutoSwitchOnFlg(MMA_RF_AUTO_TEST_DISABLE);
#endif
#endif
return;
}
示例3: MN_CAL_ReadVideoCallNvim
VOS_VOID MN_CAL_ReadVideoCallNvim( VOS_VOID )
{
MN_CALL_NV_ITEM_VIDEO_CALL_STRU stVideoCall;
VOS_UINT32 ulResult;
VOS_UINT32 ulLength;
ulLength = 0;
stVideoCall.ucStatus = VOS_FALSE;
stVideoCall.ucVpCfgState = MN_CALL_VP_BUTT;
NV_GetLength(en_NV_Item_VIDEO_CALL, &ulLength);
ulResult = NV_Read(en_NV_Item_VIDEO_CALL,
&stVideoCall,
ulLength);
/* PC工程,回放工程,CC默认打开 */
#if (defined(__PS_WIN32_RECUR__))
stVideoCall.ucStatus = VOS_TRUE;
stVideoCall.ucVpCfgState = MN_CALL_VP_MO_MT_BOTH;
#endif
if((ulResult == NV_OK)
&&(VOS_TRUE == stVideoCall.ucStatus))
{
TAF_CALL_SetVpCfgState(stVideoCall.ucVpCfgState);
}
else
{
TAF_CALL_SetVpCfgState(MN_CALL_VP_MO_MT_BOTH);
}
return;
}
示例4: MN_CALL_ReadCustomizeServiceNvim
VOS_VOID MN_CALL_ReadCustomizeServiceNvim( VOS_VOID )
{
NAS_NVIM_CUSTOMIZE_SERVICE_STRU stCustomServ;
VOS_UINT32 ulResult;
stCustomServ.ulStatus = VOS_FALSE;
stCustomServ.ulCustomizeService = VOS_FALSE;
/* 读取对应的几个NV项,并保存到全局变量中 */
ulResult = NV_Read(en_NV_Item_CustomizeService,
&stCustomServ,
sizeof(stCustomServ));
/* PC工程,回放工程,CC默认打开 */
#if (defined(__PS_WIN32_RECUR__))
stCustomServ.ulStatus = VOS_TRUE;
stCustomServ.ulCustomizeService = VOS_TRUE;
#endif
if((ulResult == NV_OK)
&&(VOS_TRUE == stCustomServ.ulStatus)
&&(VOS_TRUE == (stCustomServ.ulCustomizeService&0x01)))
{
TAF_CALL_SetCallStatusControl(VOS_TRUE);
}
else
{
TAF_CALL_SetCallStatusControl(VOS_FALSE);
}
return;
}
示例5: BST_SYS_InitBastetNvFlag
BST_VOID BST_SYS_InitBastetNvFlag(BST_VOID)
{
BASTET_SUPPORT_FLG_STRU stBastetFlag;
PS_MEM_SET(&stBastetFlag, 0x00, sizeof(BASTET_SUPPORT_FLG_STRU));
/* 读NV项en_NV_MODEM_RF_SHARE_CFG,失败,直接返回 */
if (NV_OK != NV_Read(en_NV_Item_Bastet_CONFIG,
&stBastetFlag, sizeof(BASTET_SUPPORT_FLG_STRU)))
{
BST_RLS_LOG("BST_SYS_InitBastetNvFlag():WARNING: read en_NV_Item_Bastet_CONFIG Error");
return;
}
if (BST_TRUE != stBastetFlag.ucActiveFlg)
{
/* NV内容异常保护 */
g_BstBastetFlg = BST_FALSE;
}
else
{
g_BstBastetFlg = BST_TRUE;
}
return;
}
示例6: CNAS_HSM_ReadHrpdAccessAuthInfoNvim
VOS_VOID CNAS_HSM_ReadHrpdAccessAuthInfoNvim(VOS_VOID)
{
CNAS_NVIM_HRPD_ACCESS_AUTH_INFO_STRU stHrpdAccessAuthInfo;
CNAS_CCB_HRPD_ACCESS_AUTH_INFO_STRU *pstLastHrpdAccessAuthInfo;
pstLastHrpdAccessAuthInfo = CNAS_HSM_GetLastHrpdAccessAuthInfoCtxAddr();
NAS_MEM_SET_S(&stHrpdAccessAuthInfo, sizeof(stHrpdAccessAuthInfo), 0, sizeof(CNAS_NVIM_HRPD_ACCESS_AUTH_INFO_STRU));
if (NV_OK != NV_Read(en_Nv_Item_CNAS_HRPD_ACCESS_AUTH_INFO, &stHrpdAccessAuthInfo,
sizeof(CNAS_NVIM_HRPD_ACCESS_AUTH_INFO_STRU)))
{
CNAS_ERROR_LOG(UEPS_PID_HSM, "CNAS_HSM_ReadHrpdAccessAuthInfoNvim: Read Nvim Failed");
return;
}
CNAS_MNTN_LogReadNVInfo(en_Nv_Item_CNAS_HRPD_ACCESS_AUTH_INFO,
sizeof(CNAS_NVIM_HRPD_ACCESS_AUTH_INFO_STRU),
UEPS_PID_HSM,
(VOS_UINT8 *)&stHrpdAccessAuthInfo);
pstLastHrpdAccessAuthInfo->ucAccessAuthAvailFlag = stHrpdAccessAuthInfo.ucAccessAuthAvailFlag;
if (VOS_TRUE == stHrpdAccessAuthInfo.ucAccessAuthAvailFlag)
{
pstLastHrpdAccessAuthInfo->ucAccessAuthUserNameLen = stHrpdAccessAuthInfo.ucAccessAuthUserNameLen;
NAS_MEM_CPY_S(pstLastHrpdAccessAuthInfo->aucAccessAuthUserName,
sizeof(pstLastHrpdAccessAuthInfo->aucAccessAuthUserName),
stHrpdAccessAuthInfo.aucAccessAuthUserName,
stHrpdAccessAuthInfo.ucAccessAuthUserNameLen);
}
}
示例7: CNAS_HSM_ReadHrpdSessionInfoExNvim
VOS_VOID CNAS_HSM_ReadHrpdSessionInfoExNvim(VOS_VOID)
{
CNAS_NVIM_HRPD_SESSION_INFO_EX_STRU stHrpdSessionInfoEx;
CNAS_NVIM_HRPD_UE_REV_INFO_STRU *pstLastHrpdUERevInfo;
NAS_MEM_SET_S(&stHrpdSessionInfoEx, sizeof(stHrpdSessionInfoEx), 0, sizeof(CNAS_NVIM_HRPD_SESSION_INFO_EX_STRU));
if (NV_OK != NV_Read(en_NV_Item_CNAS_HRPD_Session_Info_Ex, &stHrpdSessionInfoEx,
sizeof(CNAS_NVIM_HRPD_SESSION_INFO_EX_STRU)))
{
CNAS_ERROR_LOG(UEPS_PID_HSM, "CNAS_HSM_ReadHrpdSessionInfoExNvim: Read Nvim Failed");
return;
}
CNAS_MNTN_LogReadNVInfo(en_NV_Item_CNAS_HRPD_Session_Info_Ex,
sizeof(CNAS_NVIM_HRPD_SESSION_INFO_EX_STRU),
UEPS_PID_HSM,
(VOS_UINT8 *)&stHrpdSessionInfoEx);
CNAS_HSM_SetSessionSeed(stHrpdSessionInfoEx.ulSessionSeed);
pstLastHrpdUERevInfo = CNAS_HSM_GetLastHrpdUERevInfoCtxAddr();
NAS_MEM_CPY_S(pstLastHrpdUERevInfo,
sizeof(CNAS_NVIM_HRPD_UE_REV_INFO_STRU),
&(stHrpdSessionInfoEx.stUERevInfo),
sizeof(CNAS_NVIM_HRPD_UE_REV_INFO_STRU));
}
示例8: NAS_UTRANCTRL_ReadSmcCtrlFlgNvim
VOS_VOID NAS_UTRANCTRL_ReadSmcCtrlFlgNvim( VOS_VOID )
{
NAS_UTRANCTRL_NVIM_SMC_CTRL_FLAG_STRU stSmcCtrlFlg;
PS_MEM_SET(&stSmcCtrlFlg, 0x00, sizeof(NAS_UTRANCTRL_NVIM_SMC_CTRL_FLAG_STRU));
if ( NV_OK != NV_Read(en_NV_Item_SMC_Ctrl_Flg, &stSmcCtrlFlg, sizeof(NAS_UTRANCTRL_NVIM_SMC_CTRL_FLAG_STRU)) )
{
NAS_ERROR_LOG(WUEPS_PID_MMC, "NAS_UTRANCTRL_ReadSmcCtrlFlgNvim():WARNING: en_NV_Item_SMC_Ctrl_Flg Error");
return;
}
/* NV中的异常原因值转换 */
if ( (VOS_FALSE != stSmcCtrlFlg.ucIsUtranTddCsSmcNeeded)
&& (VOS_TRUE != stSmcCtrlFlg.ucIsUtranTddCsSmcNeeded))
{
stSmcCtrlFlg.ucIsUtranTddCsSmcNeeded = VOS_TRUE;
}
if ( (VOS_FALSE != stSmcCtrlFlg.ucIsUtranTddPsSmcNeeded)
&& (VOS_TRUE != stSmcCtrlFlg.ucIsUtranTddPsSmcNeeded))
{
stSmcCtrlFlg.ucIsUtranTddPsSmcNeeded = VOS_TRUE;
}
/* 保存NVIM中的UTRAN TDD模式下是否需要检测SMC流程值 */
NAS_UTRANCTRL_SetUtranTddCsSmcNeededFlg(stSmcCtrlFlg.ucIsUtranTddCsSmcNeeded);
NAS_UTRANCTRL_SetUtranTddPsSmcNeededFlg(stSmcCtrlFlg.ucIsUtranTddPsSmcNeeded);
return;
}
示例9: USIMM_VsimConfidentialDataVerifyErrHandle
VOS_VOID USIMM_VsimConfidentialDataVerifyErrHandle(VOS_VOID)
{
NVIM_VSIM_HVSDH_NV_STRU stDhNv = {0};
VSIM_ALGORITHM_TYPE_ENUM_UINT32 enAlgorithm = {0};
USIMM_ClearVsimGlobal();
/* 清除公私钥 */
if (NV_OK != NV_Read(en_NV_Item_VSIM_HVSDH_INFO, &stDhNv, sizeof(stDhNv)))
{
USIMM_WARNING_LOG("USIMM_VsimConfidentialDataVerify: Get HVSDT Info failed.");
}
enAlgorithm = stDhNv.enAlgorithm;
VOS_MemSet(&stDhNv, 0, sizeof(NVIM_VSIM_HVSDH_NV_STRU));
stDhNv.enAlgorithm = enAlgorithm;
if (NV_OK != NV_Write(en_NV_Item_VSIM_HVSDH_INFO, &stDhNv, sizeof(stDhNv)))
{
USIMM_WARNING_LOG("USIMM_VsimConfidentialDataVerify: Clean HVSDT Info failed.");
}
USIMM_VsimReDhNegotiateInd();
return;
}
示例10: Monitor_Init
VOS_UINT32 Monitor_Init(VOS_VOID)
{
/*读取开关分集的USIM卡温度门限*/
if(NV_OK != NV_Read(en_NV_Item_W_USIM_TEMP_ANT2_CTRL,
(VOS_VOID*)&g_stMonitorUsimAntCtrl,
sizeof(MONITOR_USIM_ANT2_CTRL)))
{
g_ulMonitorErrCode |= MONITOR_ERR_CODE_NV;
return VOS_ERR;
}
if (VOS_OK != VOS_SmCCreate("MONS", 0, VOS_SEMA4_FIFO, &(g_ulMonitorCtrlSem)))
{
g_ulMonitorErrCode |= MONITOR_ERR_CODE_SEM;
return VOS_ERR;
}
#if (VOS_VXWORKS == VOS_OS_VER)
taskSpawn("MONITOR_TASK", 159, 0, 10240,(FUNCPTR)Monitor_QueryTask, 0, 0, 0, 0, 0, 0, 0, 0,0,0);
#endif
return VOS_OK;
}
示例11: STK_ProfileInit
VOS_VOID STK_ProfileInit(USIMM_STK_CFG_STRU *pstSTKProfileContent, VOS_UINT32 ulCardType)
{
VOS_UINT8 aucUsimProfile[]=STK_USIM_PROFILE_DEFAULT;
VOS_UINT8 aucSimProfile[]= {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xC0,
0xFF,0xFF,0xFF,0xF9,0xFF,0xF7,0xC0,0xFF,0xF0,0xFF};
if (NV_OK == NV_Read(en_NV_Item_TerminalProfile_Set, pstSTKProfileContent, sizeof(USIMM_STK_CFG_STRU)))
{
return;
}
pstSTKProfileContent->ucTimer = STK_POROTECT_TIME_LEN; /*定时器长度的单位是秒*/
pstSTKProfileContent->ucFuncEnable = TAF_TRUE;
if (USIMM_CARD_USIM == ulCardType)
{
VOS_MemCpy(pstSTKProfileContent->stUsimProfile.aucProfile, aucUsimProfile, sizeof(aucUsimProfile));
pstSTKProfileContent->stUsimProfile.ucProfileLen = sizeof(aucUsimProfile);
}
else
{
VOS_MemCpy(pstSTKProfileContent->stSimProfile.aucProfile, aucSimProfile, sizeof(aucSimProfile));
pstSTKProfileContent->stSimProfile.ucProfileLen = sizeof(aucSimProfile);
}
return;
}
示例12: PPM_LogFileInit
VOS_UINT32 PPM_LogFileInit(VOS_VOID)
{
OM_CHANNLE_PORT_CFG_STRU stPortCfg;
/*读取SD Log在NV中的配置*/
if(NV_OK != NV_Read(en_NV_Item_Om_Port_Type, &stPortCfg, sizeof(OM_CHANNLE_PORT_CFG_STRU)))
{
PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "PPM_LogFileInit:Read NV Config fail!");
return VOS_OK;
}
/* 读取SD Log在NV中的配置为输出到SD卡的时候才使能 */
if (CPM_OM_PORT_TYPE_SD == stPortCfg.enPortNum)
{
OM_SDInit();
return VOS_OK;
}
#if (VOS_OS_VER == VOS_LINUX)
else if (CPM_OM_PORT_TYPE_FS == stPortCfg.enPortNum)
{
PPM_FSInitLogFile();
return VOS_OK;
}
#endif
return VOS_OK;
}
开发者ID:fly2436732935,项目名称:android_kernel_honor7_PLK-AL10_PLK-TL01H_PLK-UL00_PLK-CL00_PLK-TL00,代码行数:30,代码来源:OmSdPpm.c
示例13: TAF_MMA_ReadAttEnsCustomNvim
VOS_VOID TAF_MMA_ReadAttEnsCustomNvim(VOS_VOID)
{
NVIM_ATT_ENS_CTRL_STRU stNvAttEns;
PS_MEM_SET(&stNvAttEns, 0x00, sizeof(stNvAttEns));
/* 读NV项en_NV_Item_Att_Ens_Ctrl_Para失败 */
if (NV_OK != NV_Read(en_NV_Item_Att_Ens_Ctrl_Para,
&stNvAttEns,
sizeof(NVIM_ATT_ENS_CTRL_STRU)))
{
MMA_ERRORLOG("TAF_MMA_ReadATTCustomNvim(): Read NV Fail");
return;
}
/* 置网络选择菜单控制标识 */
if (VOS_TRUE == stNvAttEns.ucNetSelMenuFlg)
{
TAF_MMA_SetNetworkSelectionMenuEnableFlg(VOS_TRUE);
}
/* 置接入技术平衡控制标识 */
if (VOS_TRUE == stNvAttEns.ucRatBalancingFlg)
{
TAF_MMA_SetRatBalancingEnableFlg(VOS_TRUE);
}
return;
}
示例14: TAF_MMA_ReadSystemAppCofigNvim
VOS_VOID TAF_MMA_ReadSystemAppCofigNvim(VOS_VOID)
{
VOS_UINT32 ulLength;
NAS_NVIM_SYSTEM_APP_CONFIG_STRU stSysAppConfig;
PS_MEM_SET(&stSysAppConfig, 0x00, sizeof(NAS_NVIM_SYSTEM_APP_CONFIG_STRU));
/* 读取en_NV_Item_System_APP_Config,获取对接的上层应用 */
NV_GetLength(en_NV_Item_System_APP_Config, &ulLength);
if (NV_OK != NV_Read(en_NV_Item_System_APP_Config,
&stSysAppConfig, ulLength))
{
stSysAppConfig.usSysAppConfigType = SYSTEM_APP_MP;
MMA_WARNINGLOG("TAF_MMA_ReadSystemAppCofigNvim():Read en_NV_Item_System_APP_Config Failed!");
}
if ( SYSTEM_APP_ANDROID < stSysAppConfig.usSysAppConfigType)
{
g_usMmaAppConfigSupportType = SYSTEM_APP_MP;
MMA_WARNINGLOG("TAF_MMA_ReadSystemAppCofigNvim():en_NV_Item_System_APP_Config error!");
}
else
{
g_usMmaAppConfigSupportType = stSysAppConfig.usSysAppConfigType;
}
return;
}
示例15: TAF_MMA_ReadDisplaySpnFlagNvim
VOS_VOID TAF_MMA_ReadDisplaySpnFlagNvim(VOS_VOID)
{
VOS_UINT32 ulLength;
NAS_MMA_NVIM_DISPLAY_SPN_FLAG_STRU stSpnFlag;
PS_MEM_SET(&stSpnFlag, 0x00, sizeof(NAS_MMA_NVIM_DISPLAY_SPN_FLAG_STRU));
NV_GetLength(en_NV_Item_Display_Spn_Flag, &ulLength);
if (NV_OK != NV_Read(en_NV_Item_Display_Spn_Flag,
(VOS_VOID*)(&stSpnFlag),
ulLength))
{
gstMmaValue.ucCopsNotDisplaySpnFlg = MMA_FALSE;
}
else if (NV_ITEM_ACTIVE == (stSpnFlag.aucDisplaySpnFlag)[0])
{
gstMmaValue.ucCopsNotDisplaySpnFlg = (stSpnFlag.aucDisplaySpnFlag)[1];
}
else
{
}
return;
}