Available Languages?:

OSA : OS_Stimer_Check

bool OS_Stimer_Check (stimer_id)

Check if static timer overflow.

Number of static timers OS_STIMERS (1..32) must be specified in OSAcfg.h. Size of static timers is set by OS_STIMER_SIZE constant

Call allowed:

Everywhere

Parameters:

stimer_id Static timer identifier. Number and size of static timers are set in OSAcfg.h with OS_STIMERS and OS_STIMER_SIZE constants

Returns:

false static timer is counting
true static timer overflowed or was stopped/paused

Example:

void Task (void)
{
    for (;;) {
        /*...*/
        if (OS_Stimer_Check(2)) {    // If timer 2 overflowed
            OS_Stimer_Run(2, 100);   // then re-run static timer
        }
        /*...*/
    }
}

Old style name

OS_CheckSTimer

See also

 
en/osa/ref/allservices/os_stimer_check.txt · Last modified: 07.10.2010 13:57 (external edit)
 
Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki