Home
last modified time | relevance | path

Searched refs:last_count (Results 1 – 10 of 10) sorted by relevance

/Zephyr-Core-3.7.0/drivers/timer/
Dmips_cp0_timer.c29 static uint32_t last_count; variable
47 uint32_t dticks = ((now - last_count) / CYC_PER_TICK); in timer_isr()
49 last_count = now; in timer_isr()
52 uint32_t next = last_count + CYC_PER_TICK; in timer_isr()
80 uint32_t adj = (current_count - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
89 if ((int32_t)(delay_wanted + last_count - current_count) < MIN_DELAY) { in sys_clock_set_timeout()
93 set_cp0_compare(delay_wanted + last_count); in sys_clock_set_timeout()
104 uint32_t ticks_elapsed = (get_cp0_count() - last_count) / CYC_PER_TICK; in sys_clock_elapsed()
119 last_count = get_cp0_count(); in sys_clock_driver_init()
125 set_cp0_compare(last_count + CYC_PER_TICK); in sys_clock_driver_init()
Desp32_sys_timer.c35 static uint64_t last_count; variable
67 uint64_t dticks = (uint64_t)((now - last_count) / CYC_PER_TICK); in sys_timer_isr()
69 last_count += dticks * CYC_PER_TICK; in sys_timer_isr()
72 uint64_t next = last_count + CYC_PER_TICK; in sys_timer_isr()
97 adj = (uint32_t)(now - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
105 if ((int32_t)(cyc + last_count - now) < MIN_DELAY) { in sys_clock_set_timeout()
109 set_systimer_alarm(cyc + last_count); in sys_clock_set_timeout()
121 uint32_t ret = ((uint32_t)get_systimer_alarm() - (uint32_t)last_count) / CYC_PER_TICK; in sys_clock_elapsed()
159 last_count = get_systimer_alarm(); in sys_clock_driver_init()
160 set_systimer_alarm(last_count + CYC_PER_TICK); in sys_clock_driver_init()
Driscv_machine_timer.c109 static uint64_t last_count; variable
174 uint64_t dcycles = now - last_count; in timer_isr()
177 last_count += (cycle_diff_t)dticks * CYC_PER_TICK; in timer_isr()
182 uint64_t next = last_count + CYC_PER_TICK; in timer_isr()
203 cyc = last_count + CYCLES_MAX; in sys_clock_set_timeout()
206 if ((cyc - last_count) > CYCLES_MAX) { in sys_clock_set_timeout()
207 cyc = last_count + CYCLES_MAX; in sys_clock_set_timeout()
223 uint64_t dcycles = now - last_count; in sys_clock_elapsed()
248 last_count = last_ticks * CYC_PER_TICK; in sys_clock_driver_init()
249 set_mtimecmp(last_count + CYC_PER_TICK); in sys_clock_driver_init()
[all …]
Dxtensa_sys_timer.c22 static unsigned int last_count; variable
49 uint32_t dticks = (curr - last_count) / CYC_PER_TICK; in ccompare_isr()
51 last_count += dticks * CYC_PER_TICK; in ccompare_isr()
54 uint32_t next = last_count + CYC_PER_TICK; in ccompare_isr()
79 adj = (curr - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
86 cyc += last_count; in sys_clock_set_timeout()
104 uint32_t ret = (ccount() - last_count) / CYC_PER_TICK; in sys_clock_elapsed()
Dmcux_os_timer.c30 static uint64_t last_count; variable
52 uint32_t dticks = (uint32_t)((now - last_count) / CYC_PER_TICK); in mcux_lpc_ostick_isr()
57 last_count += dticks * CYC_PER_TICK; in mcux_lpc_ostick_isr()
60 uint64_t next = last_count + CYC_PER_TICK; in mcux_lpc_ostick_isr()
204 adj = (uint32_t)(now - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
212 if ((int32_t)(cyc + last_count - now) < MIN_DELAY) { in sys_clock_set_timeout()
216 OSTIMER_SetMatchValue(base, cyc + last_count - cyc_sys_compensated, NULL); in sys_clock_set_timeout()
230 (uint32_t)last_count) / CYC_PER_TICK; in sys_clock_elapsed()
274 last_count = mcux_lpc_ostick_get_compensated_timer_value(); in sys_clock_driver_init()
275 OSTIMER_SetMatchValue(base, last_count + CYC_PER_TICK, NULL); in sys_clock_driver_init()
Dintel_adsp_timer.c48 static uint64_t last_count; variable
112 dticks = (curr - last_count) / CYC_PER_TICK; in compare_isr()
118 last_count += dticks * CYC_PER_TICK; in compare_isr()
121 uint64_t next = last_count + CYC_PER_TICK; in compare_isr()
148 adj = (uint32_t)(curr - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
155 next = last_count + cyc; in sys_clock_set_timeout()
172 uint64_t ret = (count() - last_count) / CYC_PER_TICK; in sys_clock_elapsed()
221 last_count = curr; in sys_clock_driver_init()
Dhpet.c229 static __pinned_bss uint64_t last_count; variable
300 int64_t diff = (int64_t)(now - last_count); in hpet_isr()
302 if (last_count && diff < 0) { in hpet_isr()
303 now = last_count; in hpet_isr()
306 uint32_t dticks = (uint32_t)((now - last_count) / cyc_per_tick); in hpet_isr()
308 last_count += (uint64_t)dticks * cyc_per_tick; in hpet_isr()
313 uint64_t next = last_count + cyc_per_tick; in hpet_isr()
386 uint32_t ret = (uint32_t)((now - last_count) / cyc_per_tick); in sys_clock_elapsed()
460 last_count = last_tick * cyc_per_tick; in sys_clock_driver_init()
461 hpet_timer_comparator_set_safe(last_count + cyc_per_tick); in sys_clock_driver_init()
Dnrf_grtc_timer.c61 static uint64_t last_count; /* Time (SYSCOUNTER value) @last sys_clock_announce() */ variable
151 dticks = counter_sub(cc_val, last_count) / CYC_PER_TICK; in sys_clock_timeout_handler()
153 last_count += dticks * CYC_PER_TICK; in sys_clock_timeout_handler()
159 system_timeout_set_abs(last_count + CYC_PER_TICK); in sys_clock_timeout_handler()
461 return (uint32_t)(counter_sub(counter(), last_count) / CYC_PER_TICK); in sys_clock_elapsed()
530 target_time = MAX((target_time - last_count)/CYC_PER_TICK, 1)*CYC_PER_TICK + last_count; in sys_clock_set_timeout()
Dnrf_rtc_timer.c54 static uint64_t last_count; variable
476 uint32_t dticks = (uint32_t)(expire_time - last_count) / CYC_PER_TICK; in sys_clock_timeout_handler()
478 last_count += dticks * CYC_PER_TICK; in sys_clock_timeout_handler()
486 compare_set(chan, last_count + CYC_PER_TICK, in sys_clock_timeout_handler()
658 uint32_t unannounced = z_nrf_rtc_timer_read() - last_count; in sys_clock_set_timeout()
684 uint64_t target_time = cyc + last_count; in sys_clock_set_timeout()
695 return (z_nrf_rtc_timer_read() - last_count) / CYC_PER_TICK; in sys_clock_elapsed()
/Zephyr-Core-3.7.0/boards/qemu/cortex_m0/
Dnrf_timer_timer.c29 static uint32_t last_count; variable
151 uint32_t dticks = counter_sub(t, last_count) / CYC_PER_TICK; in timer0_nrf_isr()
153 last_count += dticks * CYC_PER_TICK; in timer0_nrf_isr()
159 set_absolute_ticks(last_count + CYC_PER_TICK); in timer0_nrf_isr()
177 uint32_t unannounced = counter_sub(counter(), last_count); in sys_clock_set_timeout()
203 cyc += last_count; in sys_clock_set_timeout()
221 uint32_t ret = counter_sub(counter(), last_count) / CYC_PER_TICK; in sys_clock_elapsed()
230 uint32_t ret = counter_sub(counter(), last_count) + last_count; in sys_clock_cycle_get_32()