DMCP interface  03.15_020
Timing

Timing related functions. More...

Functions

void sys_timer_disable (int timer_ix)
 Disables system timer. More...
 
void sys_timer_start (int timer_ix, uint32_t ms_value)
 Starts system timer (non-periodic pooling timer) More...
 
int sys_timer_active (int timer_ix)
 Check timer running status. More...
 
int sys_timer_timeout (int timer_ix)
 Check for timer timeout. More...
 
void sys_delay (uint32_t ms_delay)
 Delays program by specified number of milliseconds.
 
uint32_t sys_tick_count ()
 Get current tick count. More...
 
uint32_t sys_current_ms ()
 Get current millisecond. More...
 

Detailed Description

Timing related functions.

Function Documentation

◆ sys_current_ms()

uint32_t sys_current_ms ( )

Get current millisecond.

Returns
Current millisecond

◆ sys_tick_count()

uint32_t sys_tick_count ( )

Get current tick count.

Returns
Current tick count

Note that system is usually built that one tick corresponds to one millisecond. Thus, sys_current_ms() returns the same value as this function.

◆ sys_timer_active()

int sys_timer_active ( int  timer_ix)

Check timer running status.

Parameters
timer_ixTimer index
Returns
(0/1) 1 - timer is running

◆ sys_timer_disable()

void sys_timer_disable ( int  timer_ix)

Disables system timer.

Parameters
timer_ixTimer index

◆ sys_timer_start()

void sys_timer_start ( int  timer_ix,
uint32_t  ms_value 
)

Starts system timer (non-periodic pooling timer)

Parameters
timer_ixTimer index
ms_valueTimeout value (milliseconds)

◆ sys_timer_timeout()

int sys_timer_timeout ( int  timer_ix)

Check for timer timeout.

Returns
(0/1) 1 - timer expired