GET_VALUE(var,bit_number) (((var)>>(bit_number))&(0x

Idea is to move the bit to LSB and AND it with 0x01 to get its current value ...

Likewise to set a bit

SET_VALUE(var,bit_number) ((var)|(0x01<<(bit_number)

Bits are assumed to be numbered 0 to 31

Cheers!

Sunnycoder