This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

inline function is not inlined

Other Parts Discussed in Thread: MSP430F1222

Hi,

I have a project for MSP430F1222, CPU frequency 6 MHz.

It is written in C++. 

C++ dialect is "extended embedded C++". complier IAR kickstart. No any optimization.

I have two functions:

private function:

static inline void setSCL(void){
    SCL_PORT_OUT |= 1 << SCL_PIN_NUMBER;
};

// TIMER_A CC0 interrupt service routine
#pragma vector=TIMERA0_VECTOR
__interrupt void I2C::ISR_TIMER_A_CC0(void)
{

 // some code here

setSCL();

// some code here

}

When I look at the disassembly code I see that the function setSCL() is not inlined in the ISR and there is a CALL instruction to it.

Why is this and how can I make it inlined instead of using #define? 

Thanks.

**Attention** This is a public forum