Lines Matching full:top
27 static struct counter_top_cfg top; variable
34 uint32_t next_time = top.ticks; /* top.ticks is TOP_VALUE if is_top_set == false */ in schedule_next_isr()
36 if (current_value == top.ticks) { in schedule_next_isr()
49 /* We will at least get an interrupt at top.ticks even if is_top_set == false, in schedule_next_isr()
70 if (is_top_set && (current_value == top.ticks)) { in counter_isr()
71 if (top.callback) { in counter_isr()
72 top.callback(device, top.user_data); in counter_isr()
84 top.ticks = TOP_VALUE; in ctr_init()
90 hw_counter_set_wrap_value((uint64_t)top.ticks + 1); in ctr_init()
143 posix_print_warning("Can't set top value while alarm is active\n"); in ctr_set_top_value()
160 top = *cfg; in ctr_set_top_value()
161 hw_counter_set_wrap_value((uint64_t)top.ticks + 1); in ctr_set_top_value()
176 return top.ticks; in ctr_get_top_value()
190 if (ticks > top.ticks) { in ctr_set_alarm()
191 posix_print_warning("Alarm ticks %u exceed top ticks %u\n", ticks, in ctr_set_alarm()
192 top.ticks); in ctr_set_alarm()
200 if (ticks > top.ticks) { /* Handle wrap arounds */ in ctr_set_alarm()
201 ticks -= (top.ticks + 1); /* The count period is top.ticks + 1 */ in ctr_set_alarm()