Hello All,
Are there any advantages of using a macro for bit positions over using a simple bit mask?
The only ones I can think of are:
o not having magic numbers throughout your code.
o readability.
Are there any others?
E.G.
instead of using a simple bit mask:Code:#define BIT3 (0x1 <<3) ... uiData |= BIT3;
Code:uiData |= 0x08;
Regards,
Don