For reference :
if (!process.sysIDlockoutFlag)
{
/*
* return last four keystrokes before
* ALL switch and check to see all
* are valid (!= 0)
*/
p_Seq = systemIdentification(systemID);
for (int lcl = 0; lcl < 4; lcl++)
{
if (*(p_Seq + lcl) == 0)
{
process.sysIDlockoutFlag = F;
Button = NUL;
break;
}
process.sysIDlockoutFlag = T;
Button = DEFINE_SYS;
}
}
case DEFINE_SYS:
if (process.sysIDlockoutFlag)
{
switch (sysMssg)
{
case MSG1:
mssg[4] = (0xC0);
mssg[5] = *p_Seq;
sysMssg++;
break;
case MSG2:
mssg[4] = (0xA0);
mssg[5] = *(p_Seq + 1);
sysMssg++;
break;
case MSG3:
mssg[4] = (0x90);
mssg[5] = *(p_Seq + 2);
sysMssg++;
break;
case MSG4:
mssg[4] = (0x88);
mssg[5] = *(p_Seq + 3);
sysMssg++;
break;
default :
/* sysMssg = MSG1;
currentSwState = 0;
swInfo.multipleSw = F;
swInfo.err = F;
swInfo.twoSec = 0;
memset(swInfo.hits, 0, sizeof(swInfo.hits));
process.mssgPopulatedFlag = F;
Button = NUL;
wakeRadio(F);*/
}
}
if ((Button == PAIR) || (Button == DEFINE_SYS))
{
CRC_Result = CRC((char *)pTx);
mssg[6] = (char)((CRC_Result >> 8) & 0xFF);
mssg[7] = (char)(CRC_Result & 0xFF);
process.mssgPopulatedFlag = T;
}
The basics....the code above puts messages together and prepares them for another block of code which is a transmitter. If I place a breakpoint within case MSG1 I can see p_Seq and all looks fine....If I then move the breakpoint to case MSG2 only *p_Seq looks fine and *(p_Seq + x) all get scrubbed. The only place in code it gets written to is within the if statement above. I have verified that I do not break within here until all MSG1 - MSG4 have transmitted. There are conditional wrappers (not seen) around some of the code above but ALL flags indicate they do NOT change until everything has been transmitted out. Can someone give me insight as to why p_Seq values are updated from good to '0' on the last three entries??
Thanks