Lines Matching full:next
53 static void gpt_set_safe(uint32_t next) in gpt_set_safe() argument
58 next = MIN(MAX_CYCLES, next); in gpt_set_safe()
59 GPT_SetOutputCompareValue(base, kGPT_OutputCompare_Channel2, next - 1); in gpt_set_safe()
62 /* GPT fires interrupt at next counter cycle after a compare point is in gpt_set_safe()
66 * We will exit this loop if next==MAX_CYCLES, as we already in gpt_set_safe()
70 if (unlikely(((int32_t)(next - now)) <= 1)) { in gpt_set_safe()
74 next = now + bump; in gpt_set_safe()
76 next = MIN(MAX_CYCLES, next); in gpt_set_safe()
78 kGPT_OutputCompare_Channel2, next - 1); in gpt_set_safe()
80 } while ((((int32_t)(next - now)) <= 1) && (next < MAX_CYCLES)); in gpt_set_safe()
130 * Next needed call to sys_clock_announce will not be until the specified number
140 uint32_t next, adj, now; in sys_clock_set_timeout() local
143 /* Clamp ticks. We subtract one since we round up to next tick */ in sys_clock_set_timeout()
151 /* Adjustment value, used to ensure next capture is on tick boundary */ in sys_clock_set_timeout()
154 next = ticks * CYC_PER_TICK; in sys_clock_set_timeout()
156 * The following section rounds the capture value up to the next tick in sys_clock_set_timeout()
159 next += adj; in sys_clock_set_timeout()
160 next = (next / CYC_PER_TICK) * CYC_PER_TICK; in sys_clock_set_timeout()
161 next += announced_cycles; in sys_clock_set_timeout()
163 gpt_set_safe(next); in sys_clock_set_timeout()