Hello,
See below the basic code which I have developed:
********************************************************************
int a[2], Adc0Offset, Adc1Offset;
__inline__ void FunctionToInline(int *current_ptr)
{
current_ptr[0] -= Adc0Offset;
current_ptr[1] -= Adc1Offset;
}
void main(void)
{
Adc1Offset=10;
Adc0Offset=8;
EnableInterrupts;
/* include your code here */
FunctionToInline(a);
for(;;) {
__RESET_WATCHDOG(); /* feeds the dog */
} /* loop forever */
}
*********************************************************************
Right click on the file and select Disassemble option.
With inline, I can see that the function has not allocated a memory space and main() starts at 0x00, while if I remove "__inline__", main() starts at 0000001F, and function is treated as a subroutine.
I am not sure why it is not working in your code? Are you using code optimization?
Can you share your code so that issue can be replicated at our end and then we can find the cause.
-Arpita