Lines Matching refs:hw_timer
33 struct cntbase_reg *hw_timer; member
45 static uint64_t mod_gtimer_get_counter(const struct cntbase_reg *hw_timer) in mod_gtimer_get_counter() argument
58 counter_high = hw_timer->PCTH; in mod_gtimer_get_counter()
59 counter_low = hw_timer->PCTL; in mod_gtimer_get_counter()
60 } while (counter_high != hw_timer->PCTH); in mod_gtimer_get_counter()
75 ctx->hw_timer->P_CTL &= ~CNTBASE_P_CTL_IMASK; in enable()
76 ctx->hw_timer->P_CTL |= CNTBASE_P_CTL_ENABLE; in enable()
87 ctx->hw_timer->P_CTL |= CNTBASE_P_CTL_IMASK; in disable()
88 ctx->hw_timer->P_CTL &= ~CNTBASE_P_CTL_ENABLE; in disable()
99 *value = mod_gtimer_get_counter(ctx->hw_timer); in get_counter()
128 ctx->hw_timer->P_CVALL = (uint32_t)(timestamp & 0xFFFFFFFFUL); in set_timer()
129 ctx->hw_timer->P_CVALH = (uint32_t)(timestamp >> 32UL); in set_timer()
143 counter_low = ctx->hw_timer->P_CVALL; in get_timer()
144 counter_high = ctx->hw_timer->P_CVALH; in get_timer()
198 if (ctx->config->hw_timer == 0 || in gtimer_device_init()
207 ctx->hw_timer = (struct cntbase_reg *)ctx->config->hw_timer; in gtimer_device_init()
314 const struct cntbase_reg *hw_timer = (const void *)cfg->hw_timer; in mod_gtimer_timestamp() local
317 uint64_t counter = mod_gtimer_get_counter(hw_timer); in mod_gtimer_timestamp()