Lines Matching refs:MEC_BIT

110     regs->CTRL = MEC_BIT(MEC_BTMR_CTRL_RESET_Pos);  in mec_hal_btimer_init()
117 regs->CTRL |= MEC_BIT(MEC_BTMR_CTRL_ENABLE_Pos); in mec_hal_btimer_init()
119 if (flags & MEC_BIT(MEC5_BTIMER_CFG_FLAG_AUTO_RELOAD_POS)) { in mec_hal_btimer_init()
120 regs->CTRL |= MEC_BIT(MEC_BTMR_CTRL_RESTART_Pos); in mec_hal_btimer_init()
123 if (flags & MEC_BIT(MEC5_BTIMER_CFG_FLAG_COUNT_UP_POS)) { in mec_hal_btimer_init()
124 regs->CTRL |= MEC_BIT(MEC_BTMR_CTRL_CNT_DIR_Pos); in mec_hal_btimer_init()
127 if (flags & MEC_BIT(MEC5_BTIMER_CFG_FLAG_INTR_EN_POS)) { in mec_hal_btimer_init()
128 regs->IEN |= MEC_BIT(MEC_BTMR_IEN_EVENT_Pos); in mec_hal_btimer_init()
131 if (flags & MEC_BIT(MEC5_BTIMER_CFG_FLAG_START_POS)) { in mec_hal_btimer_init()
132 regs->CTRL |= MEC_BIT(MEC_BTMR_CTRL_START_Pos); in mec_hal_btimer_init()
143 if (MEC_BIT(idx) & MEC5_BASIC_TIMER_32_MSK) { in mec_hal_btimer_has_counter32()
159 if (flags & MEC_BIT(MEC5_BTMR_RST_PRESERVE_FDIV_POS)) { in mec_hal_btimer_reset()
163 if (flags & MEC_BIT(MEC5_BTMR_RST_PRESERVE_DIR_POS)) { in mec_hal_btimer_reset()
168 regs->CTRL = MEC_BIT(MEC_BTMR_CTRL_RESET_Pos); in mec_hal_btimer_reset()
180 if (regs->CTRL & MEC_BIT(MEC_BTMR_CTRL_ENABLE_Pos)) { in mec_hal_btimer_is_enabled()
231 ctrl |= (MEC_BIT(MEC_BTMR_CTRL_RELOAD_Pos) | MEC_BIT(MEC_BTMR_CTRL_ENABLE_Pos) in mec_hal_btimer_pre_and_reload()
232 | MEC_BIT(MEC_BTMR_CTRL_START_Pos)); in mec_hal_btimer_pre_and_reload()
246 ctrl |= (MEC_BIT(MEC_BTMR_CTRL_ENABLE_Pos) | MEC_BIT(MEC_BTMR_CTRL_START_Pos)); in mec_hal_btimer_start_load()
248 if (flags & MEC_BIT(MEC5_BTIMER_START_FLAG_IEN_POS)) { in mec_hal_btimer_start_load()
249 ien |= MEC_BIT(MEC_BTMR_IEN_EVENT_Pos); in mec_hal_btimer_start_load()
252 if (flags & MEC_BIT(MEC5_BTIMER_START_FLAG_AUTO_POS)) { in mec_hal_btimer_start_load()
253 ctrl |= MEC_BIT(MEC_BTMR_CTRL_RESTART_Pos); in mec_hal_btimer_start_load()
256 ctrl &= (uint32_t)~MEC_BIT(MEC_BTMR_CTRL_RESTART_Pos); in mec_hal_btimer_start_load()
259 if (flags & MEC_BIT(MEC5_BTIMER_START_FLAG_DIR_UP)) { in mec_hal_btimer_start_load()
260 ctrl |= MEC_BIT(MEC_BTMR_CTRL_CNT_DIR_Pos); in mec_hal_btimer_start_load()
262 ctrl &= (uint32_t)~MEC_BIT(MEC_BTMR_CTRL_CNT_DIR_Pos); in mec_hal_btimer_start_load()
265 regs->STATUS = MEC_BIT(MEC_BTMR_STATUS_EVENT_Pos); in mec_hal_btimer_start_load()
273 uint32_t msk = (MEC_BIT(MEC_BTMR_CTRL_ENABLE_Pos) | MEC_BIT(MEC_BTMR_CTRL_START_Pos)); in mec_hal_btimer_is_started()
284 if (regs->CTRL & MEC_BIT(MEC_BTMR_CTRL_CNT_DIR_Pos)) { in mec_hal_btimer_is_counting_up()
294 regs->CTRL |= MEC_BIT(MEC_BTMR_CTRL_RESTART_Pos); in mec_hal_btimer_auto_restart()
296 regs->CTRL &= (uint32_t)~MEC_BIT(MEC_BTMR_CTRL_RESTART_Pos); in mec_hal_btimer_auto_restart()
302 if (regs->CTRL & MEC_BIT(MEC_BTMR_CTRL_RESTART_Pos)) { in mec_hal_btimer_is_auto_restart()
313 regs->CTRL |= MEC_BIT(MEC_BTMR_CTRL_HALT_Pos); in mec_hal_btimer_reload_run()
315 regs->CTRL &= (uint32_t)~MEC_BIT(MEC_BTMR_CTRL_HALT_Pos); in mec_hal_btimer_reload_run()
322 regs->STATUS = MEC_BIT(MEC_BTMR_STATUS_EVENT_Pos); in mec_hal_btimer_intr_clr()
329 regs->IEN |= MEC_BIT(MEC_BTMR_IEN_EVENT_Pos); in mec_hal_btimer_intr_en()
331 regs->IEN &= (uint32_t)~MEC_BIT(MEC_BTMR_IEN_EVENT_Pos); in mec_hal_btimer_intr_en()
349 btimer_pm_save_buf[i] = (uint8_t)(regs->CTRL & MEC_BIT(MEC_BTMR_CTRL_ENABLE_Pos)); in mec_hal_btimer_pm_save_disable()
350 regs->CTRL &= (uint32_t)~MEC_BIT(MEC_BTMR_CTRL_ENABLE_Pos); in mec_hal_btimer_pm_save_disable()
360 regs->CTRL |= MEC_BIT(MEC_BTMR_CTRL_ENABLE_Pos); in mec_hal_btimer_pm_restore()