Home
last modified time | relevance | path

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

/Zephyr-Core-3.6.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()
Dmcux_os_timer.c28 static uint64_t last_count; variable
37 uint32_t dticks = (uint32_t)((now - last_count) / CYC_PER_TICK); in mcux_lpc_ostick_isr()
42 last_count += dticks * CYC_PER_TICK; in mcux_lpc_ostick_isr()
45 uint64_t next = last_count + CYC_PER_TICK; in mcux_lpc_ostick_isr()
74 adj = (uint32_t)(now - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
82 if ((int32_t)(cyc + last_count - now) < MIN_DELAY) { in sys_clock_set_timeout()
86 OSTIMER_SetMatchValue(base, cyc + last_count, NULL); in sys_clock_set_timeout()
100 (uint32_t)last_count) / CYC_PER_TICK; in sys_clock_elapsed()
132 last_count = OSTIMER_GetCurrentTimerValue(base); in sys_clock_driver_init()
133 OSTIMER_SetMatchValue(base, last_count + CYC_PER_TICK, NULL); in sys_clock_driver_init()
Desp32c3_sys_timer.c36 static uint64_t last_count; variable
68 uint64_t dticks = (uint64_t)((now - last_count) / CYC_PER_TICK); in sys_timer_isr()
70 last_count += dticks * CYC_PER_TICK; in sys_timer_isr()
73 uint64_t next = last_count + CYC_PER_TICK; in sys_timer_isr()
98 adj = (uint32_t)(now - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
106 if ((int32_t)(cyc + last_count - now) < MIN_DELAY) { in sys_clock_set_timeout()
110 set_systimer_alarm(cyc + last_count); in sys_clock_set_timeout()
122 uint32_t ret = ((uint32_t)get_systimer_alarm() - (uint32_t)last_count) / CYC_PER_TICK; in sys_clock_elapsed()
153 last_count = get_systimer_alarm(); in sys_clock_driver_init()
154 set_systimer_alarm(last_count + CYC_PER_TICK); in sys_clock_driver_init()
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()
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()
223 last_count = curr; in sys_clock_driver_init()
Driscv_machine_timer.c83 static uint64_t last_count; variable
148 uint64_t dcycles = now - last_count; in timer_isr()
151 last_count += (cycle_diff_t)dticks * CYC_PER_TICK; in timer_isr()
156 uint64_t next = last_count + CYC_PER_TICK; in timer_isr()
205 uint64_t dcycles = now - last_count; in sys_clock_elapsed()
230 last_count = last_ticks * CYC_PER_TICK; in sys_clock_driver_init()
231 set_mtimecmp(last_count + CYC_PER_TICK); in sys_clock_driver_init()
239 set_mtimecmp(last_count + CYC_PER_TICK); in smp_timer_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_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()
Dnrf_grtc_timer.c68 static uint64_t last_count; variable
188 dticks = counter_sub(now, last_count) / CYC_PER_TICK; in sys_clock_timeout_handler()
190 last_count += dticks * CYC_PER_TICK; in sys_clock_timeout_handler()
475 return (uint32_t)(counter_sub(counter(), last_count) / CYC_PER_TICK); in sys_clock_elapsed()
554 off = (now - last_count) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
558 off -= (now - last_count); in sys_clock_set_timeout()
/Zephyr-Core-3.6.0/boards/arm/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()