Lines Matching refs:hwtimer
197 struct es32f3_hwtimer_dev *hwtimer = (struct es32f3_hwtimer_dev *)timer->parent.user_data; in es32f3_hwtimer_init() local
202 RT_ASSERT(hwtimer != RT_NULL); in es32f3_hwtimer_init()
206 ald_timer_base_init(hwtimer->hwtimer_periph); in es32f3_hwtimer_init()
207 ald_timer_interrupt_config(hwtimer->hwtimer_periph, TIMER_IT_UPDATE, ENABLE); in es32f3_hwtimer_init()
208 NVIC_EnableIRQ(hwtimer->IRQn); in es32f3_hwtimer_init()
211 …hwtimer->parent.freq = ald_cmu_get_pclk1_clock()/((hwtimer->hwtimer_periph->perh->PRES & 0xFFFF)+1… in es32f3_hwtimer_init()
212 hwtimer_info->maxfreq = hwtimer->parent.freq; in es32f3_hwtimer_init()
213 hwtimer_info->minfreq = (hwtimer->parent.freq)/0xFFFF; in es32f3_hwtimer_init()
221 struct es32f3_hwtimer_dev *hwtimer = (struct es32f3_hwtimer_dev *)timer->parent.user_data; in es32f3_hwtimer_start() local
223 RT_ASSERT(hwtimer != RT_NULL); in es32f3_hwtimer_start()
225 WRITE_REG(hwtimer->hwtimer_periph->perh->AR, cnt); in es32f3_hwtimer_start()
226 ald_timer_base_start(hwtimer->hwtimer_periph); in es32f3_hwtimer_start()
233 struct es32f3_hwtimer_dev *hwtimer = (struct es32f3_hwtimer_dev *)timer->parent.user_data; in es32f3_hwtimer_stop() local
235 RT_ASSERT(hwtimer != RT_NULL); in es32f3_hwtimer_stop()
237 ald_timer_base_stop(hwtimer->hwtimer_periph); in es32f3_hwtimer_stop()
242 struct es32f3_hwtimer_dev *hwtimer = (struct es32f3_hwtimer_dev *)timer->parent.user_data; in es32f3_hwtimer_count_get() local
245 RT_ASSERT(hwtimer != RT_NULL); in es32f3_hwtimer_count_get()
247 hwtimer_count = READ_REG(hwtimer->hwtimer_periph->perh->COUNT); in es32f3_hwtimer_count_get()
258 struct es32f3_hwtimer_dev *hwtimer = (struct es32f3_hwtimer_dev *)timer->parent.user_data; in es32f3_hwtimer_control() local
260 RT_ASSERT(hwtimer != RT_NULL); in es32f3_hwtimer_control()
281 hwtimer->hwtimer_periph->perh->PRES = (uint32_t)target; in es32f3_hwtimer_control()
286 hwtimer->hwtimer_periph->perh->PRES = (uint32_t)target - 1; in es32f3_hwtimer_control()
293 …hwtimer->parent.freq = ald_cmu_get_pclk1_clock()/((hwtimer->hwtimer_periph->perh->PRES & 0xFFFF)+1… in es32f3_hwtimer_control()
300 ald_timer_base_stop(hwtimer->hwtimer_periph); in es32f3_hwtimer_control()