Please anyone explain the meaning of this...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Please anyone explain the meaning of this...

1,315 Views
SBK_SBK_SBK_SBK
Contributor I

#define testReg8Bits(RegName, GetMask) (RegName & (GetMask))
#define clrReg8Bits(RegName, ClrMask) (RegName &= (byte)(~(byte)(ClrMask)))
#define setReg8Bits(RegName, SetMask) (RegName |= (byte)(SetMask))
#define invertReg8Bits(RegName, InvMask) (RegName ^= (byte)(InvMask))
#define clrSetReg8Bits(RegName, ClrMask, SetMask) (RegName = (RegName & ((byte)(~(byte)(ClrMask)))) | (byte)(SetMask))
#define seqClrSetReg8Bits(RegName, BitsMask, BitsVal) ((RegName &= (byte)~((byte)~((byte)(BitsVal)) & ((byte)(BitsMask)))),\

can anyone please explain the meaning of this............

0 Kudos
Reply
4 Replies

1,281 Views
TomE
Specialist II
0 Kudos
Reply

1,292 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Can you tell me the part number that you are using? 

 

this is part of a sample code? Processor expert?

 

 

0 Kudos
Reply

1,285 Views
TomE
Specialist II

If you look in the other THREE unrelated forums they're posting related questions to, the part is "MC9S08PT8".

I think the "the meaning of this" is that they don't know anything about C programming or the preprocessor. The ProcessorExpert system assumes you have experience with C Programming, the language before being able to use what it produces.

I'd suggest downloading as many App Notes with sample code as you can to get an idea of how these functions are used to make the CPU do what you want. Interrupts are really tricky (you don't call them, they call you).

Tom

 

0 Kudos
Reply

1,287 Views
SBK_SBK_SBK_SBK
Contributor I

yes. it is in IO MAP file. i am facing issue with the processor expert. 

0 Kudos
Reply