Lines Matching +full:initial +full:- +full:key

4  * SPDX-License-Identifier: Apache-2.0
27 #define MAX_TICKS ((COUNTER_MAX / CYC_PER_TICK) - 1)
59 GPT_SetOutputCompareValue(base, kGPT_OutputCompare_Channel2, next - 1); in gpt_set_safe()
70 if (unlikely(((int32_t)(next - now)) <= 1)) { 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()
88 k_spinlock_key_t key; in mcux_imx_gpt_isr() local
91 key = k_spin_lock(&lock); in mcux_imx_gpt_isr()
107 tick_delta += (MAX_CYCLES - announced_cycles) / CYC_PER_TICK; in mcux_imx_gpt_isr()
114 tick_delta += (now - announced_cycles) / CYC_PER_TICK; in mcux_imx_gpt_isr()
115 announced_cycles += (((now - announced_cycles) / CYC_PER_TICK) * in mcux_imx_gpt_isr()
125 k_spin_unlock(&lock, key); in mcux_imx_gpt_isr()
139 k_spinlock_key_t key; in sys_clock_set_timeout() local
144 ticks = CLAMP((ticks - 1), 0, (int32_t)MAX_TICKS); in sys_clock_set_timeout()
146 key = k_spin_lock(&lock); in sys_clock_set_timeout()
152 adj = (now - announced_cycles) + (CYC_PER_TICK - 1); in sys_clock_set_timeout()
164 k_spin_unlock(&lock, key); in sys_clock_set_timeout()
175 k_spinlock_key_t key = k_spin_lock(&lock); in sys_clock_elapsed() local
178 cyc -= announced_cycles; in sys_clock_elapsed()
179 k_spin_unlock(&lock, key); in sys_clock_elapsed()
211 /* We use reset mode, but reset at MAX ticks- see comment below */ in sys_clock_driver_init()
227 MAX_CYCLES - 1); in sys_clock_driver_init()
229 /* Set initial trigger value to one tick worth of cycles */ in sys_clock_driver_init()
231 CYC_PER_TICK - 1); in sys_clock_driver_init()
238 CYC_PER_TICK - 1); in sys_clock_driver_init()