We are all used to this kind of manipulating registers:
SomeRegister |= (1 << What_ever_bit_I_wanna_change ) // we do this for changing a specific bit to one without changing the others.
SomeRegister &= ~(1 << What_ever_bit_I_wanna_change ) // we do this for changing a specific bit to zero without changing the others.
I am planning to use the same paradigm, but with enumerations, something like this:
typedef enum {
Acc_2g (Something to change only the desired bits in the related register that I don't know how to do),
Acc_4g (Something to change only the desired bits in the related register that I don't know how to do)
}Res;
Any idea how to use the bitwise operators inside the enumeration?