cancel
Showing results for 
Search instead for 
Did you mean: 

Does STVD suport static inline key to declare function?

wolver
Associate II
Posted on April 24, 2009 at 13:31

Does STVD suport static inline key to declare function?

5 REPLIES 5
wolver
Associate II
Posted on May 17, 2011 at 15:02

Hello

''static inline'' key to declare function have error in STVD. I know GCC suport ''static inline'', Then STVD?

Redards

wolver

mozra27
Associate II
Posted on May 17, 2011 at 15:02

Hi wolver,

I think this is related to the compiler:

With cosmic compiler you can do this by the directive @inline

With raisonnance compiler you can check the compiler option ''SPEED optimization'' and the compiler do this automatically

Regards

mozra

luca239955_st
Associate III
Posted on May 17, 2011 at 15:02

just out of curiosity: why would you want to inline functions ?

wolver
Associate II
Posted on May 17, 2011 at 15:02

Hi mozra

I use STM8 Cosmic, not raisonnance. But I should try to do it by the directive @inline ...

Regards

wolver

wolver
Associate II
Posted on May 17, 2011 at 15:02

Hi _luca

We have some short fuctions, such as following... If ''static inline'' can be used, The compiler obj has not push-pop stack.

Regards

wolver

PS: some short fuctions...

void ModifyCurSystemStatus(unsigned char current_status)

{

g_ucSystemCurStatus = current_status;

}

unsigned char GetCurSystemStatus(void)

{

return g_ucSystemCurStatus;

}

void load_timer3_value(void)

{

TIM3_CNTRH = 0x1E;

TIM3_CNTRL = 0xFF;

}