update New Feature#1215
1. modified the rfic/src/main.c 2. read more info from ucp_rfic_cfg.json
This commit is contained in:
parent
3773c7aa38
commit
216968e1c2
@ -42,6 +42,8 @@ typedef struct ucp_rfic_cfg_info
|
|||||||
uint16_t enUcpLog;
|
uint16_t enUcpLog;
|
||||||
uint16_t u16padding;
|
uint16_t u16padding;
|
||||||
uint32_t u32padding2;
|
uint32_t u32padding2;
|
||||||
|
ucp_rfic_calPara_t st_rfic_calPara;
|
||||||
|
|
||||||
}ucp_rfic_cfg_info_t;
|
}ucp_rfic_cfg_info_t;
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
@ -91,6 +93,19 @@ ucp_rfic_cfg_info_t rfic_get_cfg_info()
|
|||||||
config = xzJSON_GetObjectItem(item, "enUcpLog");
|
config = xzJSON_GetObjectItem(item, "enUcpLog");
|
||||||
st_rfic_cfg.enUcpLog = config->valueint;
|
st_rfic_cfg.enUcpLog = config->valueint;
|
||||||
|
|
||||||
|
config = xzJSON_GetObjectItem(item, "calOrxGainIndex");
|
||||||
|
st_rfic_cfg.st_rfic_calPara.calOrxGainIndex = config->valueint;
|
||||||
|
|
||||||
|
item = xzJSON_GetObjectItem(item, "calChAttPara");
|
||||||
|
config = xzJSON_GetObjectItem(item, "ch1");
|
||||||
|
st_rfic_cfg.st_rfic_calPara.calChAttPara[0] = config->valueint;
|
||||||
|
config = xzJSON_GetObjectItem(item, "ch2");
|
||||||
|
st_rfic_cfg.st_rfic_calPara.calChAttPara[1] = config->valueint;
|
||||||
|
config = xzJSON_GetObjectItem(item, "ch3");
|
||||||
|
st_rfic_cfg.st_rfic_calPara.calChAttPara[2] = config->valueint;
|
||||||
|
config = xzJSON_GetObjectItem(item, "ch4");
|
||||||
|
st_rfic_cfg.st_rfic_calPara.calChAttPara[3] = config->valueint;
|
||||||
|
|
||||||
xzJSON_Delete(root);
|
xzJSON_Delete(root);
|
||||||
|
|
||||||
return st_rfic_cfg;
|
return st_rfic_cfg;
|
||||||
@ -170,6 +185,14 @@ int32_t main(int32_t argc, char* argvp[])
|
|||||||
st_rfic_cfg_info.enOrx,
|
st_rfic_cfg_info.enOrx,
|
||||||
st_rfic_cfg_info.en204C,
|
st_rfic_cfg_info.en204C,
|
||||||
st_rfic_cfg_info.enUcpLog);
|
st_rfic_cfg_info.enUcpLog);
|
||||||
|
|
||||||
|
printf("GainIndex:%d, calChAttPara.ch1:%d, ch2:%d, ch3:%d, ch4:%d\r\n",
|
||||||
|
st_rfic_cfg_info.st_rfic_calPara.calOrxGainIndex,
|
||||||
|
st_rfic_cfg_info.st_rfic_calPara.calChAttPara[0],
|
||||||
|
st_rfic_cfg_info.st_rfic_calPara.calChAttPara[1],
|
||||||
|
st_rfic_cfg_info.st_rfic_calPara.calChAttPara[2],
|
||||||
|
st_rfic_cfg_info.st_rfic_calPara.calChAttPara[3]);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* call jesd init function */
|
/* call jesd init function */
|
||||||
UCP_API_RFIC_CellInit(st_rfic_cfg_info.sampleRate,
|
UCP_API_RFIC_CellInit(st_rfic_cfg_info.sampleRate,
|
||||||
@ -185,7 +208,8 @@ int32_t main(int32_t argc, char* argvp[])
|
|||||||
st_rfic_cfg_info.initAtt,
|
st_rfic_cfg_info.initAtt,
|
||||||
st_rfic_cfg_info.initGain,
|
st_rfic_cfg_info.initGain,
|
||||||
st_rfic_cfg_info.auxLo,
|
st_rfic_cfg_info.auxLo,
|
||||||
st_rfic_cfg_info.enOrx);
|
st_rfic_cfg_info.enOrx,
|
||||||
|
st_rfic_cfg_info.st_rfic_calPara);
|
||||||
//UCP_API_RFIC_CellSetup(2575770000u, 2575770000u, 0);
|
//UCP_API_RFIC_CellSetup(2575770000u, 2575770000u, 0);
|
||||||
|
|
||||||
/* post sem */
|
/* post sem */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user