Valid contexts – Comtrol eCos User Manual

Page 60

Advertising
background image

Counters

off between doing work whenever a new alarm is added to a counter and doing work whenever a tick occurs. It is
application-dependent which of these is more appropriate.

Valid contexts

cyg_counter_create

is typically called during system initialization but may also be called in thread

context. Similarly

cyg_counter_delete

may be called during initialization or in thread context.

cyg_counter_current_value

,

cyg_counter_set_value

and

cyg_counter_tick

may be called during

initialization or from thread or DSR context. In fact,

cyg_counter_tick

is usually called from inside a DSR in

response to an external event of some sort.

60

Advertising