Skip to main content
wolver
Associate III
Apr 24, 2009 11:31 AM UTC
Question

Does STVD suport static inline key to declare function?

Posted on April 24, 2009 at 13:31

Does STVD suport static inline key to declare function?

    This topic has been closed for replies.

    5 replies

    mozra27
    Visitor II
    May 17, 2011 1:02 PM UTC
    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

    wolver
    wolverAuthor
    Associate III
    May 17, 2011 1:02 PM UTC
    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

    wolver
    wolverAuthor
    Associate III
    May 17, 2011 1:02 PM UTC
    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;

    }

    wolver
    wolverAuthor
    Associate III
    May 17, 2011 1:02 PM UTC
    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

    luca239955_st
    Associate II
    May 17, 2011 1:02 PM UTC
    Posted on May 17, 2011 at 15:02

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