The following does not work (ACC is always 0, despite out[0] is 255): ACC0 = out[0] & 1 == 1 ? 1 : 0; ACC1 = out[0] & 2 == 2 ? 1 : 0; out[0] &= 0xFC; send_string(" acc1"); send_byte(ACC); if (ACC0) out[0] |= 2; if (ACC1) out[0] |= 1;
View all questions in Keil forum