INT8U CheckSum(void) { INT8U ChVa = SetZero; INT8U SUM = SetZero; INT8U Tmp2 = SetZero; INT16U Temp1 = SetZero;
Temp1 = 0x15; Temp1 += 0xf8; Temp1 += 0x66; Temp1 += 0x12; Temp1 += 0x03; /* Tmp1 += RKE_FIFO_DATA[0] & 0x00ff; Tmp1 += (RKE_FIFO_DATA[0] & 0xff00) >> 8; Tmp1 += RKE_FIFO_DATA[1] & 0x0003; Tmp1 += (RKE_FIFO_DATA[1] & 0xff00) >> 8; Tmp1 += RKE_FIFO_DATA[2] & 0x00ff; Tmp1 += (RKE_FIFO_DATA[2] & 0xff00) >> 8;
Tmp2 = (INT8U)(Tmp1 & 0x00ff + (Tmp1 & 0xff00) >> 8); SUM = (2 << Tmp2) + Tmp2 & 0xfc; ChVa = (INT8U)(RKE_FIFO_DATA[1] & 0x00fc); */ /*if (SUM == ChVa) return (TRUE); else return (FALSE); */ }
为什么这个程序不执行上面的加法运算呢????
|