Lines Matching refs:timer_data

66 static struct ipso_timer_data timer_data[MAX_INSTANCE_COUNT];  variable
167 if (timer_data[i].active) { in remaining_time_read_cb()
168 temp = timer_data[i].delay_duration * MSEC_PER_SEC; in remaining_time_read_cb()
169 temp -= (k_uptime_get() - timer_data[i].trigger_offset); in remaining_time_read_cb()
170 timer_data[i].remaining_time = (double)temp / MSEC_PER_SEC; in remaining_time_read_cb()
172 timer_data[i].remaining_time = 0; in remaining_time_read_cb()
175 *data_len = sizeof(timer_data[i].remaining_time); in remaining_time_read_cb()
176 return &timer_data[i].remaining_time; in remaining_time_read_cb()
191 temp = timer_data[i].cumulative_time_ms; in cumulative_time_read_cb()
192 if (timer_data[i].active) { in cumulative_time_read_cb()
193 temp += k_uptime_get() - timer_data[i].trigger_offset; in cumulative_time_read_cb()
196 timer_data[i].cumulative_time = (double)temp / MSEC_PER_SEC; in cumulative_time_read_cb()
198 *data_len = sizeof(timer_data[i].cumulative_time); in cumulative_time_read_cb()
199 return &timer_data[i].cumulative_time; in cumulative_time_read_cb()
215 timer_data[i].cumulative_time_ms = 0U; in cumulative_time_post_write_cb()
232 if (!timer_data[i].enabled && timer_data[i].active) { in enabled_post_write_cb()
233 return stop_timer(&timer_data[i], true); in enabled_post_write_cb()
252 timer_data[i].trigger_counter = 0U; in trigger_counter_post_write_cb()
275 return start_timer(&timer_data[i]); in timer_trigger_cb()
303 (void)memset(&timer_data[avail], 0, sizeof(timer_data[avail])); in timer_inst_create()
304 k_work_init_delayable(&timer_data[avail].timer_work, timer_work_cb); in timer_inst_create()
305 timer_data[avail].delay_duration = 5; /* 5 seconds */ in timer_inst_create()
306 timer_data[avail].enabled = true; in timer_inst_create()
307 timer_data[avail].timer_mode = TIMER_MODE_ONE_SHOT; in timer_inst_create()
308 timer_data[avail].obj_inst_id = obj_inst_id; in timer_inst_create()
316 res_inst[avail], j, &timer_data[avail].delay_duration, in timer_inst_create()
317 sizeof(timer_data[avail].delay_duration)); in timer_inst_create()
319 false, true, &timer_data[avail].remaining_time, in timer_inst_create()
320 sizeof(timer_data[avail].remaining_time), in timer_inst_create()
323 res_inst[avail], j, &timer_data[avail].min_off_time, in timer_inst_create()
324 sizeof(timer_data[avail].min_off_time)); in timer_inst_create()
327 true, &timer_data[avail].enabled, in timer_inst_create()
328 sizeof(timer_data[avail].enabled), in timer_inst_create()
331 false, true, &timer_data[avail].cumulative_time, in timer_inst_create()
332 sizeof(timer_data[avail].cumulative_time), in timer_inst_create()
336 res_inst[avail], j, &timer_data[avail].active, in timer_inst_create()
337 sizeof(timer_data[avail].active)); in timer_inst_create()
339 true, &timer_data[avail].trigger_counter, in timer_inst_create()
340 sizeof(timer_data[avail].trigger_counter), in timer_inst_create()
343 &timer_data[avail].timer_mode, in timer_inst_create()
344 sizeof(timer_data[avail].timer_mode)); in timer_inst_create()