This is a very basic question. The way we set bits in a register of msp430 is different from the commonly used method. Please go through the example given below :
Let's assume there is a register R and its n'th bit is named as X in datasheet.
The way we set the X bit (n'th bit) for most other MCUs (like AVR) is as follows :
R |= (1 << X) ;
This is same as: R |= (1 << n) ;
So, X = n
But for MSP430, I see it's done like this:
R |= X ;
This is NOT same as: R |= n ;
So, X != n
I am confused here. Does that mean the Register bit names are defined differently in msp430's header files?