Home
last modified time | relevance | path

Searched refs:now_ticks (Results 1 – 2 of 2) sorted by relevance

/Zephyr-latest/samples/drivers/counter/alarm/src/
Dmain.c71 uint32_t now_ticks; in test_counter_interrupt_fn() local
76 err = counter_get_value(counter_dev, &now_ticks); in test_counter_interrupt_fn()
78 now_ticks = counter_get_top_value(counter_dev) - now_ticks; in test_counter_interrupt_fn()
86 now_usec = counter_ticks_to_us(counter_dev, now_ticks); in test_counter_interrupt_fn()
/Zephyr-latest/drivers/counter/
Dcounter_gecko_stimer.c182 uint32_t now_ticks = 0; in counter_gecko_set_alarm() local
201 error_code = counter_gecko_get_value(dev, &now_ticks); in counter_gecko_set_alarm()
202 if (now_ticks < alarm_cfg->ticks) { in counter_gecko_set_alarm()
203 dev_data->alarm[chan_id].ticks = top_val + (alarm_cfg->ticks - now_ticks); in counter_gecko_set_alarm()
206 (top_val - (now_ticks - alarm_cfg->ticks)) % top_val; in counter_gecko_set_alarm()