AnsweredAssumed Answered

Access indivisual bits in k60 MCU

Question asked by Arun Kumar on Jun 16, 2015
Latest reply on Jun 17, 2015 by Alice_Yang

Hello Everyone,

This question is very basic.

I would like to know the syntax for accessing individual bits .


For example Consider this register


I would like to access the MST bit in this register.I'm not sure how to code it in code warrior.


For example in microchip's MPLAB IDE it is done like this:

I2C0_C1bits.MST = 1;     //start command


Is there any equivalent syntax in freescale cw?


I know i can OR a value to the I2C0_C1 register like this

I2C0_C1 |= I2C_C1_MST_MASK;

,but that is another alternative.


Thanks in advance,