Home
last modified time | relevance | path

Searched refs:timer (Results 1 – 25 of 528) sorted by relevance

12345678910>>...22

/bsp/rockchip/rk3500/driver/hwtimer/
A Dhwtimer-rockchip_timer.c204 struct rk_timer *time = timer->timer; in rk_timer_isr()
213 struct rk_timer *timer = _timer0.timer; in rt_ktime_hrtimer_bind() local
230 struct rk_timer *timer = rt_calloc(1, sizeof(*timer)); in rk_timer_probe() local
232 if (!timer) in rk_timer_probe()
237 _timer0.timer = timer; in rk_timer_probe()
263 timer->ctrl = timer->base + timer_data->ctrl_reg; in rk_timer_probe()
267 timer->freq = rt_clk_get_rate(timer->clk); in rk_timer_probe()
274 timer->parent.info = &timer->info; in rk_timer_probe()
276 timer->info.maxfreq = timer->freq; in rk_timer_probe()
277 timer->info.minfreq = timer->freq; in rk_timer_probe()
[all …]
/bsp/allwinner/libraries/sunxi-hal/hal/source/timer/
A Dsunxi_htimer.c58 timer->callback(timer->param); in sunxi_htimer_irq_handle()
80 sunxi_htimer_sync(timer); in sunxi_htimer_stop()
110 if (tick < g_htimer[timer].min_delta_ticks || tick > g_htimer[timer].max_delta_ticks) in sunxi_htimer_set_oneshot()
122 sunxi_htimer_stop(timer); in sunxi_htimer_set_oneshot()
133 if (tick < g_htimer[timer].min_delta_ticks || tick > g_htimer[timer].max_delta_ticks) in sunxi_htimer_set_periodic()
145 sunxi_htimer_stop(timer); in sunxi_htimer_set_periodic()
171 if (timer == NULL) in sunxi_htimer_init()
179 timer[i].timer_id = i; in sunxi_htimer_init()
185 timer[i].param = NULL; in sunxi_htimer_init()
186 irq_request(timer[i].irq, sunxi_htimer_irq_handle, (void *)&timer[i]); in sunxi_htimer_init()
[all …]
A Dsunxi_timer.c49 if (timer->callback != NULL) in sunxi_timer_irq_handle()
51 timer->callback(timer->param); in sunxi_timer_irq_handle()
80 sunxi_timer_sync(timer); in sunxi_timer_stop()
112 if (tick < g_timer[timer].min_delta_ticks || tick > g_timer[timer].max_delta_ticks) in sunxi_timer_set_oneshot()
123 sunxi_timer_stop(timer); in sunxi_timer_set_oneshot()
125 sunxi_timer_setup(tick, timer); in sunxi_timer_set_oneshot()
127 sunxi_timer_start(timer, false); in sunxi_timer_set_oneshot()
136 if (tick < g_timer[timer].min_delta_ticks || tick > g_timer[timer].max_delta_ticks) in sunxi_timer_set_periodic()
147 sunxi_timer_stop(timer); in sunxi_timer_set_periodic()
149 sunxi_timer_setup(tick, timer); in sunxi_timer_set_periodic()
[all …]
A Dhal_timer.c36 void hal_timer_init(hal_timer_id_t timer) in hal_timer_init() argument
38 sunxi_timer_init(timer); in hal_timer_init()
41 void hal_timer_uninit(hal_timer_id_t timer) in hal_timer_uninit() argument
43 sunxi_timer_uninit(timer); in hal_timer_uninit()
46 void hal_timer_stop(hal_timer_id_t timer) in hal_timer_stop() argument
48 sunxi_timer_stop(timer); in hal_timer_stop()
51 void hal_timer_start(hal_timer_id_t timer, bool periodic) in hal_timer_start() argument
53 sunxi_timer_start(timer, periodic); in hal_timer_start()
56 hal_timer_status_t hal_timer_set_oneshot(hal_timer_id_t timer, uint32_t delay_us, timer_callback ca… in hal_timer_set_oneshot() argument
60 ret = sunxi_timer_set_oneshot(delay_us, timer, callback, callback_param); in hal_timer_set_oneshot()
[all …]
/bsp/xuantie/libraries/xuantie_libraries/chip_riscv_dummy/src/drivers/
A Dtimer.c28 if (timer->callback) { in dw_timer_irq_handler()
29 timer->callback(timer, timer->arg); in dw_timer_irq_handler()
71 CSI_PARAM_CHK_NORETVAL(timer); in csi_timer_uninit()
121 CSI_PARAM_CHK(timer, 0U); in csi_timer_get_remaining_value()
134 CSI_PARAM_CHK(timer, 0U); in csi_timer_get_load_value()
147 CSI_PARAM_CHK(timer, false); in csi_timer_is_running()
165 timer->callback = callback; in csi_timer_attach_callback()
166 timer->arg = arg; in csi_timer_attach_callback()
167 csi_irq_attach((uint32_t)timer->dev.irq_num, &dw_timer_irq_handler, &timer->dev); in csi_timer_attach_callback()
181 timer->callback = NULL; in csi_timer_detach_callback()
[all …]
/bsp/allwinner/libraries/sunxi-hal/hal/source/sdmmc/osal/os/RT-Thread/
A Dos_timer.c53 OS_HANDLE_ASSERT(!OS_TimerIsValid(timer), timer->handle); in OS_TimerCreate()
66 if (timer->handle == NULL) { in OS_TimerCreate()
78 OS_HANDLE_ASSERT(OS_TimerIsValid(timer), timer->handle); in OS_TimerDelete()
86 OS_TimerSetInvalid(timer); in OS_TimerDelete()
101 OS_HANDLE_ASSERT(OS_TimerIsValid(timer), timer->handle); in OS_TimerStart()
103 ret = rt_timer_start(timer->handle); in OS_TimerStart()
133 OS_HANDLE_ASSERT(OS_TimerIsValid(timer), timer->handle); in OS_TimerChangePeriod()
135 if (OS_TimerIsActive(timer)) { in OS_TimerChangePeriod()
166 OS_HANDLE_ASSERT(OS_TimerIsValid(timer), timer->handle); in OS_TimerStop()
168 if (!OS_TimerIsActive(timer)) { in OS_TimerStop()
[all …]
/bsp/efm32/Libraries/emlib/src/
A Dem_timer.c100 EFM_ASSERT(TIMER_REF_VALID(timer)); in TIMER_Enable()
104 timer->CMD = TIMER_CMD_START; in TIMER_Enable()
108 timer->CMD = TIMER_CMD_STOP; in TIMER_Enable()
132 EFM_ASSERT(TIMER_REF_VALID(timer)); in TIMER_Init()
137 timer->CMD = TIMER_CMD_STOP; in TIMER_Init()
141 timer->CNT = _TIMER_CNT_RESETVALUE; in TIMER_Init()
143 timer->CTRL = in TIMER_Init()
163 timer->CMD = TIMER_CMD_START; in TIMER_Init()
192 timer->CC[ch].CTRL = in TIMER_InitCC()
249 timer->CMD = TIMER_CMD_STOP; in TIMER_Reset()
[all …]
/bsp/efm32/
A Ddrv_timer.c64 struct efm32_timer_device_t *timer; in rt_hs_timer_init() local
68 timer->hook.cbFunc = RT_NULL; in rt_hs_timer_init()
69 timer->hook.userPtr = RT_NULL; in rt_hs_timer_init()
101 struct efm32_timer_device_t *timer; in rt_hs_timer_control() local
184 device->user_data = timer; in rt_hw_timer_register()
206 if (timer->hook.cbFunc != RT_NULL) in rt_hw_timer_isr()
208 (timer->hook.cbFunc)(timer->hook.userPtr); in rt_hw_timer_isr()
244 if (timer == RT_NULL) in rt_hw_timer_unit_init()
315 return timer; in rt_hw_timer_unit_init()
318 if (timer) in rt_hw_timer_unit_init()
[all …]
/bsp/allwinner/libraries/sunxi-hal/hal/source/sdmmc/osal/os/FreeRTOS/
A Dos_timer.c76 OS_HANDLE_ASSERT(!OS_TimerIsValid(timer), timer->handle); in OS_TimerCreate()
90 if (timer->handle == NULL) { in OS_TimerCreate()
95 timer->priv = priv; in OS_TimerCreate()
118 OS_HANDLE_ASSERT(!OS_TimerIsValid(timer), timer->handle); in OS_TimerCreate()
143 OS_HANDLE_ASSERT(OS_TimerIsValid(timer), timer->handle); in OS_TimerDelete()
151 OS_TimerSetInvalid(timer); in OS_TimerDelete()
153 OS_Free(timer->priv); in OS_TimerDelete()
154 timer->priv = NULL; in OS_TimerDelete()
170 OS_HANDLE_ASSERT(OS_TimerIsValid(timer), timer->handle); in OS_TimerStart()
212 OS_HANDLE_ASSERT(OS_TimerIsValid(timer), timer->handle); in OS_TimerChangePeriod()
[all …]
/bsp/efm32/Libraries/emlib/inc/
A Dem_timer.h426 return(timer->CNT); in TIMER_CounterGet()
442 timer->CNT = val; in TIMER_CounterSet()
466 timer->IFC = flags; in TIMER_IntClear()
483 timer->IEN &= ~(flags); in TIMER_IntDisable()
505 timer->IEN |= flags; in TIMER_IntEnable()
525 return(timer->IF); in TIMER_IntGet()
554 tmp = timer->IEN; in TIMER_IntGetEnabled()
574 timer->IFS = flags; in TIMER_IntSet()
600 timer->TOPB = val; in TIMER_TopBufSet()
616 return(timer->TOP); in TIMER_TopGet()
[all …]
/bsp/raspberry-pico/Drivers/
A Ddrv_hwtimer.c25 rt_hwtimer_t timer; member
30 static void _hwtimer_stop(rt_hwtimer_t *timer);
81 rt_device_hwtimer_isr(&_tmr->timer); in _hwtmr_isr()
88 rt_device_hwtimer_isr(&_tmr->timer); in _repeat_timer_isr()
98 _timer_t *_tmr = rt_container_of(timer, _timer_t, timer); in _hwtimer_start()
110 _timer_t *_tmr = rt_container_of(timer, _timer_t, timer); in _hwtimer_stop()
111 if(timer->mode == HWTIMER_MODE_ONESHOT) in _hwtimer_stop()
119 _timer_t *_tmr = rt_container_of(timer, _timer_t, timer); in _hwtimer_count_get()
127 _timer_t *_tmr = rt_container_of(timer, _timer_t, timer); in _hwtimer_control()
135 *(rt_hwtimer_t*)args = _tmr->timer; in _hwtimer_control()
[all …]
/bsp/bluetrum/libraries/hal_drivers/
A Ddrv_hwtimer.c74 RT_ASSERT(timer != RT_NULL); in _rt_device_hwtimer_isr()
76 timer->overflow ++; in _rt_device_hwtimer_isr()
78 if (timer->cycles != 0) in _rt_device_hwtimer_isr()
80 timer->cycles --; in _rt_device_hwtimer_isr()
83 if (timer->cycles == 0) in _rt_device_hwtimer_isr()
85 timer->cycles = timer->reload; in _rt_device_hwtimer_isr()
91 timer->ops->stop(timer); in _rt_device_hwtimer_isr()
97 timer->parent.rx_indicate(&timer->parent, sizeof(struct rt_hwtimerval)); in _rt_device_hwtimer_isr()
108 RT_ASSERT(timer != RT_NULL); in timer_init()
135 RT_ASSERT(timer != RT_NULL); in timer_start()
[all …]
/bsp/bouffalo_lab/libraries/rt_drivers/
A Ddrv_hwtimer.c25 rt_hwtimer_t timer; member
31 static void _hwtimer_stop(rt_hwtimer_t *timer);
32 static rt_uint32_t _hwtimer_count_get(rt_hwtimer_t *timer);
82 static void _hwtmr_isr(_gptimer_t *timer) in _hwtmr_isr() argument
87 rt_device_hwtimer_isr(&timer->timer); in _hwtmr_isr()
133 static void _hwtimer_stop(rt_hwtimer_t *timer) in _hwtimer_stop() argument
139 static rt_uint32_t _hwtimer_count_get(rt_hwtimer_t *timer) in _hwtimer_count_get() argument
158 *(rt_hwtimer_t*)args = _gptmr->timer; in _hwtimer_control()
161 _gptmr->timer.mode = *(rt_uint32_t*)args; in _hwtimer_control()
177 s_gptimers[i]->timer.info = &_hwtimer_info; in rt_hw_hwtimer_init()
[all …]
/bsp/xuantie/libraries/xuantie_libraries/csi/csi2/include/drv/
A Dtimer.h40 void (*callback)(csi_timer_t *timer, void *arg);
51 csi_error_t csi_timer_init(csi_timer_t *timer, uint32_t idx);
58 void csi_timer_uninit(csi_timer_t *timer);
66 csi_error_t csi_timer_start(csi_timer_t *timer, uint32_t timeout_us);
73 void csi_timer_stop(csi_timer_t *timer);
80 uint32_t csi_timer_get_remaining_value(csi_timer_t *timer);
87 uint32_t csi_timer_get_load_value(csi_timer_t *timer);
96 bool csi_timer_is_running(csi_timer_t *timer);
112 void csi_timer_detach_callback(csi_timer_t *timer);
119 csi_error_t csi_timer_enable_pm(csi_timer_t *timer);
[all …]
/bsp/hpmicro/libraries/drivers/
A Ddrv_hwtimer.c22 rt_hwtimer_t timer; member
30 static void hpm_hwtimer_stop(rt_hwtimer_t *timer);
169 static void hpm_hwtmr_isr(hpm_gptimer_t *timer) in hpm_hwtmr_isr() argument
174 rt_device_hwtimer_isr(&timer->timer); in hpm_hwtmr_isr()
175 gptmr_clear_status(timer->base, GPTMR_CH_RLD_STAT_MASK(timer->channel)); in hpm_hwtmr_isr()
203 timer->mode = mode; in hpm_hwtimer_start()
218 static void hpm_hwtimer_stop(rt_hwtimer_t *timer) in hpm_hwtimer_stop() argument
248 *(rt_hwtimer_t*)args = hpm_gptmr->timer; in hpm_hwtimer_control()
251 hpm_gptmr->timer.mode = *(rt_uint32_t*)args; in hpm_hwtimer_control()
268 s_gptimers[i]->timer.info = &hpm_hwtimer_info; in rt_hw_hwtimer_init()
[all …]
/bsp/allwinner/libraries/sunxi-hal/include/hal/sdmmc/osal/RT-Thread/
A D_os_timer.h61 OS_Status OS_TimerCreate(OS_Timer_t *timer, OS_TimerType type,
63 OS_Status OS_TimerDelete(OS_Timer_t *timer);
64 OS_Status OS_TimerStart(OS_Timer_t *timer);
65 OS_Status OS_TimerChangePeriod(OS_Timer_t *timer, OS_Time_t periodMS);
66 OS_Status OS_TimerStop(OS_Timer_t *timer);
73 static inline int OS_TimerIsValid(OS_Timer_t *timer) in OS_TimerIsValid() argument
75 return (timer->handle != OS_INVALID_HANDLE); in OS_TimerIsValid()
83 static inline void OS_TimerSetInvalid(OS_Timer_t *timer) in OS_TimerSetInvalid() argument
85 timer->handle = OS_INVALID_HANDLE; in OS_TimerSetInvalid()
99 static inline int OS_TimerIsActive(OS_Timer_t *timer) in OS_TimerIsActive() argument
[all …]
/bsp/k230/drivers/interdrv/hwtimer/
A Ddrv_timer.c63 k230_timer_stop(timer); in k230_timer_init()
68 if (timer->freq == timer->info->minfreq) in k230_timer_init()
70 if (timer->freq == timer->info->maxfreq) in k230_timer_init()
72 if (timer->freq == 50*MHz) in k230_timer_init()
74 if (timer->freq == 25*MHz) in k230_timer_init()
114 timer->freq = *((rt_uint32_t*)arg); in k230_timer_ctrl()
116 if (timer->freq == timer->info->minfreq) in k230_timer_ctrl()
118 if (timer->freq == timer->info->maxfreq) in k230_timer_ctrl()
120 if (timer->freq == 50*MHz) in k230_timer_ctrl()
122 if (timer->freq == 25*MHz) in k230_timer_ctrl()
[all …]
/bsp/allwinner/libraries/sunxi-hal/include/hal/sdmmc/osal/FreeRTOS/
A D_os_timer.h88 OS_Status OS_TimerCreate(OS_Timer_t *timer, OS_TimerType type,
90 OS_Status OS_TimerDelete(OS_Timer_t *timer);
91 OS_Status OS_TimerStart(OS_Timer_t *timer);
92 OS_Status OS_TimerChangePeriod(OS_Timer_t *timer, OS_Time_t periodMS);
93 OS_Status OS_TimerStop(OS_Timer_t *timer);
100 static __always_inline int OS_TimerIsValid(OS_Timer_t *timer) in OS_TimerIsValid() argument
102 return (timer->handle != OS_INVALID_HANDLE); in OS_TimerIsValid()
110 static __always_inline void OS_TimerSetInvalid(OS_Timer_t *timer) in OS_TimerSetInvalid() argument
112 timer->handle = OS_INVALID_HANDLE; in OS_TimerSetInvalid()
126 static __always_inline int OS_TimerIsActive(OS_Timer_t *timer) in OS_TimerIsActive() argument
[all …]
/bsp/nuvoton/libraries/m031/rtt_port/
A Ddrv_timer_capture.c28 TIMER_T *timer; member
161 if (nu_capture->timer == TIMER0) in nu_timer_init()
170 if (nu_capture->timer == TIMER1) in nu_timer_init()
179 if (nu_capture->timer == TIMER2) in nu_timer_init()
188 if (nu_capture->timer == TIMER3) in nu_timer_init()
247 TIMER_ResetCounter(nu_capture->timer); in nu_capture_open()
255 TIMER_EnableInt(nu_capture->timer); in nu_capture_open()
259 TIMER_Start(nu_capture->timer); in nu_capture_open()
274 TIMER_Stop(nu_capture->timer); in nu_capture_close()
278 TIMER_DisableInt(nu_capture->timer); in nu_capture_close()
[all …]
A Ddrv_timer.c21 #define NU_TIMER_DEVICE(timer) (nu_timer_t *)(timer) argument
22 #define TIMER_SET_OPMODE(timer, u32OpMode) ((timer)->CTL = ((timer)->CTL & ~TIMER_CTL_OPMODE_Msk) … argument
35 static void nu_timer_stop(rt_hwtimer_t *timer);
36 static rt_uint32_t nu_timer_count_get(rt_hwtimer_t *timer);
79 RT_ASSERT(timer != RT_NULL); in nu_timer_init()
108 RT_ASSERT(timer != RT_NULL); in nu_timer_start()
143 static void nu_timer_stop(rt_hwtimer_t *timer) in nu_timer_stop() argument
145 RT_ASSERT(timer != RT_NULL); in nu_timer_stop()
154 static rt_uint32_t nu_timer_count_get(rt_hwtimer_t *timer) in nu_timer_count_get() argument
156 RT_ASSERT(timer != RT_NULL); in nu_timer_count_get()
[all …]
/bsp/stm32/libraries/HAL_Drivers/drivers/
A Ddrv_pm.c37 static rt_device_t timer = RT_NULL; variable
117 LOG_E("Get PM timer %s frequency failed %d", timer->parent.name, ret); in stm32_pm_tick_from_os_tick()
122 LOG_D("Get PM timer %s frequency %d", timer->parent.name, freq); in stm32_pm_tick_from_os_tick()
144 LOG_E("Get PM timer %s frequency failed %d", timer->parent.name, ret); in stm32_os_tick_from_pm_tick()
166 RT_ASSERT(timer != RT_NULL); in pm_timer_start()
187 ret = rt_device_control(timer, DRV_HW_LPTIMER_CTRL_START, &timeout); in pm_timer_start()
206 rt_device_control(timer, HWTIMER_CTRL_STOP, RT_NULL); in pm_timer_stop()
226 LOG_E("Get PM timer %s count failed %d", timer->parent.name, ret); in pm_timer_get_tick()
265 timer = rt_device_find(BSP_USING_PM_TIMER); in drv_pm_hw_init()
267 if(timer == RT_NULL) in drv_pm_hw_init()
[all …]
A Ddrv_lptim.c61 static void timer_init(struct rt_hwtimer_device *timer, rt_uint32_t state) in timer_init() argument
63 if(timer == RT_NULL) in timer_init()
123 if(timer == RT_NULL) in timer_start()
130 LPTIM_HandleTypeDef *tim = (LPTIM_HandleTypeDef *)timer->parent.user_data; in timer_start()
156 static void timer_stop(rt_hwtimer_t *timer) in timer_stop() argument
158 if(timer == RT_NULL) in timer_stop()
196 static rt_uint32_t timer_counter_get(rt_hwtimer_t *timer) in timer_counter_get() argument
202 static rt_err_t timer_ctrl(rt_hwtimer_t *timer, rt_uint32_t cmd, void *arg) in timer_ctrl() argument
204 if(timer == RT_NULL) in timer_ctrl()
239 timer_start(timer, *(rt_uint32_t *)arg, HWTIMER_MODE_ONESHOT); in timer_ctrl()
[all …]
/bsp/nuvoton/libraries/m480/rtt_port/
A Ddrv_timer_capture.c28 TIMER_T *timer; member
160 if (nu_capture->timer == TIMER0) in nu_timer_init()
169 if (nu_capture->timer == TIMER1) in nu_timer_init()
178 if (nu_capture->timer == TIMER2) in nu_timer_init()
187 if (nu_capture->timer == TIMER3) in nu_timer_init()
246 TIMER_ResetCounter(nu_capture->timer); in nu_capture_open()
254 TIMER_EnableInt(nu_capture->timer); in nu_capture_open()
258 TIMER_Start(nu_capture->timer); in nu_capture_open()
273 TIMER_Stop(nu_capture->timer); in nu_capture_close()
277 TIMER_DisableInt(nu_capture->timer); in nu_capture_close()
[all …]
/bsp/nuvoton/libraries/m2354/rtt_port/
A Ddrv_timer_capture.c30 TIMER_T *timer; member
190 if (nu_capture->timer == TIMER0) in nu_timer_init()
199 if (nu_capture->timer == TIMER1) in nu_timer_init()
208 if (nu_capture->timer == TIMER2) in nu_timer_init()
217 if (nu_capture->timer == TIMER3) in nu_timer_init()
226 if (nu_capture->timer == TIMER4) in nu_timer_init()
235 if (nu_capture->timer == TIMER5) in nu_timer_init()
302 TIMER_EnableInt(nu_capture->timer); in nu_capture_open()
306 TIMER_Start(nu_capture->timer); in nu_capture_open()
321 TIMER_Stop(nu_capture->timer); in nu_capture_close()
[all …]
/bsp/cvitek/drivers/
A Ddrv_timer.c127 dw_timer_regs_t timer[DW_NR_TIMERS]; member
138 rt_hwtimer_t timer; member
143 static void _timer_stop(rt_hwtimer_t *timer);
336 rt_device_hwtimer_isr(&_tmr->timer); in rt_hw_hwtmr_isr()
347 _timer_t *_tmr = rt_container_of(timer, _timer_t, timer); in _timer_init()
358 _timer_t *_tmr = rt_container_of(timer, _timer_t, timer); in _timer_start()
380 _timer_t *_tmr = rt_container_of(timer, _timer_t, timer); in _timer_stop()
388 _timer_t *_tmr = rt_container_of(timer, _timer_t, timer); in _timer_count_get()
397 _timer_t *_tmr = rt_container_of(timer, _timer_t, timer); in _timer_control()
405 *(rt_hwtimer_t*)args = _tmr->timer; in _timer_control()
[all …]

Completed in 47 milliseconds

12345678910>>...22