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.

CCS/MSP-EXP430G2: ULP Minimize function calls from within ISRs - Are there examples of inline function for MSP430?

Part Number: MSP-EXP430G2

Tool/software: Code Composer Studio

// ADC10 interrupt service routine
#if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
#pragma vector=ADC10_VECTOR
__interrupt void adc10_isr(void)
#elif defined(__GNUC__)
void __attribute__ ((interrupt(ADC10_VECTOR))) adc10_isr(void)
#else
#error Compiler not supported!
#endif
{
    int data = ADC10MEM;

    uart_logger((data & 0x00FF));
    // ULP Advisor > Rule 10.1 Minimize function calls from within ISRs
    }
}

Hello, I was logging my ADC data. I wanted to send the LSB (lowest significant bit) via UART (115200 baud, no parity) after sampling.

I use the MSP-EXP430G2 launchpad and CCS 8 on Windows 10.

The ULP advisor says

"Instead of calling functions in the ISR, try to inline the instructions,

i.e. move the code instructions directly into the ISR,

or move the entire function call out of the ISR if possible (especially for processing intensive functions)."

I couldn't find how inline keywords are used for __TI_COMPILER_VERSION__  /  __IAR_SYSTEMS_ICC__  /  __GNUC__

Are there examples that use the inline or static inline keyword to solve this?