Question.1
A developer defines a bit-toggle macro and uses it:
#define TOGGLE_BIT(reg, n) ((reg) ^= (1 << (n)), (reg) & (1 << (n)))
uint8_t ctrl = 0x00;
uint8_t pos = 3;
TOGGLE_BIT(ctrl, pos++);The developer expects to toggle bit 3 and check if it's now set. What actually happens?