Hello!
I'm new here and new at C. I am working off some example code and modifying it to suit my application.
I don't understand the example code even though I think it is basic.
I'll start with a function referenced.
I do not understand what |= means (line 5 of function)
Any help is appreciated.Code:void WriteByte (uchar DATA) { uchar RG = 0; unit temp = 0xB800; temp|=DATA; if (RG = 0) { goto loop; } else { RG = 0; } } void main() uint ChkSum; while (1) { ChkSum = 0; WriteByte (0x30); ChkSum+=0x30; WriteByte (0x31); ChkSum+=0x31; WriteByte (0x32); ChkSum+=0x32; WriteByte (0x33); ChkSum+=0x33; // what does += mean? ChkSum&=0xFF; // what does &= mean? WriteByte(ChkSum); }
N_N