11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Pragma directivesbis_nmi_ie1Syntax#pragma bis_nmi_ie1=maskParametersmaskA constant expressionDescriptionExampleUse this pragma directive for changing the interrupt control bits in the register IE, withinan NMI service routine. A BIS.W #mask, IE1 instruction is generated right before theRETI instruction at the end of the function, after any POP instructions.The effect is that NMI interrupts cannot occur until after the BIS instruction. Theadvantage of placing it at the end of the POP instructions is that less stack will be usedin the case of nested interrupts.In the following example, the OFIE bit will be set as the last instruction before the RETIinstruction:#pragma bis_nmi_ie1=OFIE#pragma vector=NMI_VECTOR__interrupt void myInterruptFunction(void){...}bitfieldsSyntax#pragma bitfields={reversed|default}ParametersreverseddefaultBitfield members are placed from the most significant bit to theleast significant bit.Bitfield members are placed from the least significant bit to themost significant bit.DescriptionUse this pragma directive to control the order of bitfield members.By default, the <strong>MSP430</strong> <strong>IAR</strong> C/<strong>C++</strong> <strong>Compiler</strong> places bitfield members from the leastsignificant bit to the most significant bit in the container type. Use the#pragma bitfields=reversed directive to place the bitfield members from themost significant to the least significant bit. This setting remains active until you turn itoff again with the #pragma bitfields=default directive.See also Bitfields, page 171.Part 2. <strong>Compiler</strong> <strong>reference</strong>201

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!