Lines Matching refs:hw_cnt
122 uint32_t hw_cnt; in timer_5ms_one_shot() local
141 hw_cnt = MS_TO_COUNT(32768, 5/*ms*/); in timer_5ms_one_shot()
142 timer2_reg->ET2CNTLH2R = (uint8_t)((hw_cnt >> 16) & 0xff); in timer_5ms_one_shot()
143 timer2_reg->ET2CNTLHR = (uint8_t)((hw_cnt >> 8) & 0xff); in timer_5ms_one_shot()
144 timer2_reg->ET2CNTLLR = (uint8_t)(hw_cnt & 0xff); in timer_5ms_one_shot()
221 uint32_t hw_cnt; in sys_clock_set_timeout() local
263 hw_cnt = 1; in sys_clock_set_timeout()
266 hw_cnt = MIN(dcycles, EVENT_TIMER_MAX_CNT); in sys_clock_set_timeout()
271 IT8XXX2_EXT_CNTX(EVENT_TIMER) = hw_cnt; in sys_clock_set_timeout()
281 LOG_DBG("timeout is 0x%x, set hw count 0x%x", ticks, hw_cnt); in sys_clock_set_timeout()
332 uint32_t hw_cnt; in timer_init() local
335 hw_cnt = ms; in timer_init()
338 hw_cnt = MS_TO_COUNT(32768, ms); in timer_init()
340 hw_cnt = MS_TO_COUNT(1024, ms); in timer_init()
342 hw_cnt = MS_TO_COUNT(32, ms); in timer_init()
344 hw_cnt = MS_TO_COUNT(EC_FREQ, ms); in timer_init()
351 if (hw_cnt == 0) { in timer_init()
374 IT8XXX2_EXT_CNTX(ext_timer) = hw_cnt; in timer_init()