This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1243BOOST: Why assign rfChanCfgArgs->cascading = cascade; in mmw_example.c

Part Number: AWR1243BOOST
Other Parts Discussed in Thread: AWR1243

void MMWL_readChannelConfig(rlChanCfg_t *rfChanCfgArgs,
unsigned short cascade)
{
int readAllParams = 0;
char *s, buff[256], name[STRINGLEN], value[STRINGLEN];
/*seek the pointer to starting of the file so that
we dont miss any parameter*/
fseek(mmwl_configfPtr, 0, SEEK_SET);
/*parse the parameters by reading each line of the config file*/
while (((s = fgets(buff, sizeof buff, mmwl_configfPtr)) != NULL)
&& (readAllParams == 0))
{
/* Skip blank lines and comments */
if (buff[0] == '\n' || buff[0] == '#')
{
continue;
}

/* Parse name/value pair from line */
s = strtok(buff, "=");
if (s == NULL)
{
continue;
}
else
{
strncpy(name, s, STRINGLEN);
}
s = strtok(NULL, "=");
if (s == NULL)
{
continue;
}
else
{
strncpy(value, s, STRINGLEN);
}
MMWL_trim(value);

if (strcmp(name, "channelTx") == 0)
rfChanCfgArgs->txChannelEn = atoi(value);

if (strcmp(name, "channelRx") == 0)
rfChanCfgArgs->rxChannelEn = atoi(value);

if (strcmp(name, "cascading") == 0)
{
rfChanCfgArgs->cascading = atoi(value);
readAllParams = 1;
}
}
rfChanCfgArgs->cascading = cascade;
}

Why is the last line rfChanCfgArgs->cascading = cascade;? In this case, cascading value in config.txt will never be read to cascade.