[−][src]Function mynewt::kernel::os::os_callout_init
pub unsafe extern "C" fn os_callout_init(
cf: *mut os_callout,
evq: *mut os_eventq,
ev_cb: os_event_fn,
ev_arg: *mut c_void
)
Initialize a callout.
Callouts are used to schedule events in the future onto a task's event queue. Callout timers are scheduled using the os_callout_reset() function. When the timer expires, an event is posted to the event queue specified in os_callout_init(). The event argument given here is posted in the ev_arg field of that event.
c
: The callout to initializeevq
: The event queue to post an OS_EVENT_T_TIMER event totimo_func
: The function to call on this callout for the host task used to provide multiple timer events to a task (this can be NULL.)ev_arg
: The argument to provide to the event when posting the timer.