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/TMS320F28379D: Regarding InstaSPIN code

Part Number: TMS320F28379D
Other Parts Discussed in Thread: MOTORWARE

Tool/software: Code Composer Studio

Sir, 

I am working on motor control using the above Delfino  MCU. I also go through instaSPIN code and examples. 

My query is very basic but I am not able to figure out this in code. 

My question is In the motorware code there are some function definitions in header files with init "inline","static" and "static inline". 

I want to know that why exactly we put these keywords before function, Although I know about the basic use of these keyword but here,  

Is some specific requirement fulfilled by using this or the other reason ? Is these function run from RAM or any thing else ?

Please guide me regarding the Query. 

Thanking You

Ashutosh

  • "inline" instructs the compiler to attempt to embed the function content into the calling code instead of executing an actual call.
    "static" refers to the scope, in C it means that the function/variable can only be used in this files or compile unit. So, "static inline" means the inline function which can be used in this file or compile unit only.

    Actually, this is a C language question, more detail can be found in any book or paper about C programming, and can be found in Wiki also.
  • So by using inline we just avoid the delay of calling a function and make the execution process fast as possible. Am I correct ?