I'm implementing a control program which uses a number of bits as flags.
I have a byte assigned to group these together:
byte Flags =0;
I can set an individual bit using bitSet(Flags,n) ( also clear & read using the relevant function )
So I may have:
However to make the code more readable is there a way to substitute the parameter 'Flags,n' with a named constant, i.e.
OverTemp = Flags,0
MotorRun = Flags,1
To allow bitRead(OverTemp) etc?