93 lines
2.4 KiB
C
93 lines
2.4 KiB
C
|
/****************************************************************************
|
||
|
*
|
||
|
* Copy right: 2019-, Copyrigths of EigenComm Ltd.
|
||
|
* File name: plat_config.c
|
||
|
* Description: platform configuration source file
|
||
|
* History: Rev1.0 2019-01-18
|
||
|
*
|
||
|
****************************************************************************/
|
||
|
|
||
|
#include <stdio.h>
|
||
|
#include <stdarg.h>
|
||
|
//#include "unilog.h"
|
||
|
#include DEBUG_LOG_HEADER_FILE
|
||
|
#include "slpman.h"
|
||
|
#include "mw_nvm_config.h"
|
||
|
#ifdef FEATURE_CTCC_DM_ENABLE
|
||
|
#include "ctcc_dm.h"
|
||
|
#endif
|
||
|
#ifdef FEATURE_CMCC_DM_ENABLE
|
||
|
#include "cmcc_dm.h"
|
||
|
#endif
|
||
|
#ifdef FEATURE_CUCC_DM_ENABLE
|
||
|
#include "cucc_dm.h"
|
||
|
#endif
|
||
|
#include "dm_task.h"
|
||
|
|
||
|
|
||
|
#ifdef FEATURE_CMCC_DM_ENABLE
|
||
|
MWNvmCfgDmCmccParam* pDmCmccParam = NULL;
|
||
|
#endif
|
||
|
#ifdef FEATURE_CTCC_DM_ENABLE
|
||
|
MWNvmCfgDmCtccParam* pDmCtccParam = NULL;
|
||
|
#endif
|
||
|
|
||
|
void ecAutoRegisterInit(void)
|
||
|
{
|
||
|
#ifdef FEATURE_CUCC_DM_ENABLE
|
||
|
MWNvmCfgDmCuccParam pDmCuccParam;
|
||
|
#endif
|
||
|
|
||
|
slpManSlpState_t slpState = slpManGetLastSlpState();
|
||
|
|
||
|
#ifdef FEATURE_CMCC_DM_ENABLE
|
||
|
if(pDmCmccParam == NULL){
|
||
|
pDmCmccParam = mallocEc(sizeof(MWNvmCfgDmCmccParam));
|
||
|
}
|
||
|
mwNvmCfgGetDmCmccParam(pDmCmccParam);
|
||
|
if(pDmCmccParam->enableFlag != 0)
|
||
|
{
|
||
|
ECPLAT_PRINTF(UNILOG_DM, ecAutoRegisterInit_1, P_SIG, "autoReg CMCC is enable call init");
|
||
|
cmccAutoRegisterInit(pDmCmccParam, slpState);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
ECPLAT_PRINTF(UNILOG_DM, ecAutoRegisterInit_2, P_SIG, "autoReg CMCC is disable");
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#ifdef FEATURE_CTCC_DM_ENABLE
|
||
|
if(pDmCtccParam == NULL){
|
||
|
pDmCtccParam = mallocEc(sizeof(MWNvmCfgDmCtccParam));
|
||
|
}
|
||
|
mwNvmCfgGetDmCtccParam(pDmCtccParam);
|
||
|
if(pDmCtccParam->enableFlag != 0)
|
||
|
{
|
||
|
ECPLAT_PRINTF(UNILOG_DM, ecAutoRegisterInit_3, P_SIG, "autoReg CTCC is enable call init");
|
||
|
ctccAutoRegisterInit(pDmCtccParam, slpState);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
ECPLAT_PRINTF(UNILOG_DM, ecAutoRegisterInit_4, P_SIG, "autoReg CTCC is disable");
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#ifdef FEATURE_CUCC_DM_ENABLE
|
||
|
mwNvmCfgGetDmCuccParam(&pDmCuccParam);
|
||
|
if(pDmCuccParam.enableFlag != 0)
|
||
|
{
|
||
|
if(pDmCuccParam.autoRegPeriod != 0)
|
||
|
{
|
||
|
ECPLAT_PRINTF(UNILOG_DM, ecAutoRegisterInit_5, P_SIG, "autoReg CUCC is enable call init");
|
||
|
cuccAutoRegisterInit(NULL);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
ECPLAT_PRINTF(UNILOG_DM, ecAutoRegisterInit_6, P_SIG, "autoReg CUCC is disable");
|
||
|
}
|
||
|
}
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
|