Home
last modified time | relevance | path

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

12345678910>>...14

/device/soc/rockchip/common/sdk_linux/drivers/clocksource/
Dtimer-rockchip.c46 struct rk_timer timer; member
56 return &container_of(ce, struct rk_clkevt, ce)->timer; in rk_timer()
59 static inline void rk_timer_disable(struct rk_timer *timer) in rk_timer_disable() argument
61 writel_relaxed(TIMER_DISABLE, timer->ctrl); in rk_timer_disable()
64 static inline void rk_timer_enable(struct rk_timer *timer, u32 flags) in rk_timer_enable() argument
66 writel_relaxed(TIMER_ENABLE | flags, timer->ctrl); in rk_timer_enable()
69 static void rk_timer_update_counter(unsigned long cycles, struct rk_timer *timer) in rk_timer_update_counter() argument
71 writel_relaxed(cycles, timer->base + TIMER_LOAD_COUNT0); in rk_timer_update_counter()
72 writel_relaxed(0, timer->base + TIMER_LOAD_COUNT1); in rk_timer_update_counter()
75 static void rk_timer_interrupt_clear(struct rk_timer *timer) in rk_timer_interrupt_clear() argument
[all …]
DKconfig36 bool "BCM2835 timer driver" if COMPILE_TEST
39 Enables the support for the BCM2835 timer driver.
42 bool "BCM mobile timer driver" if COMPILE_TEST
45 Enables the support for the BCM Kona mobile timer driver.
48 bool "Texas Instruments DaVinci timer driver" if COMPILE_TEST
50 Enables the support for the TI DaVinci timer driver.
53 bool "Digicolor timer driver" if COMPILE_TEST
57 Enables the support for the digicolor timer driver.
60 bool "DW APB timer driver" if COMPILE_TEST
62 Enables the support for the dw_apb timer.
[all …]
/device/soc/esp/esp32/components/esp_timer/src/
Desp_timer.c83 static esp_err_t timer_insert(esp_timer_handle_t timer);
84 static esp_err_t timer_remove(esp_timer_handle_t timer);
85 static bool timer_armed(esp_timer_handle_t timer);
90 static void timer_insert_inactive(esp_timer_handle_t timer);
91 static void timer_remove_inactive(esp_timer_handle_t timer);
138 esp_err_t IRAM_ATTR esp_timer_start_once(esp_timer_handle_t timer, uint64_t timeout_us) in esp_timer_start_once() argument
140 if (timer == NULL) { in esp_timer_start_once()
143 if (!is_initialized() || timer_armed(timer)) { in esp_timer_start_once()
147 timer->alarm = esp_timer_get_time() + timeout_us; in esp_timer_start_once()
148 timer->period = 0; in esp_timer_start_once()
[all …]
/device/soc/telink/b91/b91_ble_sdk/vendor/common/
Dblt_soft_timer.c44 if (TIME_COMPARE_BIG(blt_timer.timer[j].t, blt_timer.timer[j + 1].t)) { in blt_soft_timer_sort()
46 memcpy(temp, &blt_timer.timer[j], sizeof(blt_time_event_t)); in blt_soft_timer_sort()
47 memcpy(&blt_timer.timer[j], &blt_timer.timer[j + 1], sizeof(blt_time_event_t)); in blt_soft_timer_sort()
48 memcpy(&blt_timer.timer[j + 1], temp, sizeof(blt_time_event_t)); in blt_soft_timer_sort()
71 blt_timer.timer[blt_timer.currentNum].cb = func; in blt_soft_timer_add()
72 blt_timer.timer[blt_timer.currentNum].interval = interval_us * SYSTEM_TIMER_TICK_1US; in blt_soft_timer_add()
73 … blt_timer.timer[blt_timer.currentNum].t = now + blt_timer.timer[blt_timer.currentNum].interval; in blt_soft_timer_add()
78 blc_pm_setAppWakeupLowPower(blt_timer.timer[0].t, 1); in blt_soft_timer_add()
99 memcpy(&blt_timer.timer[i], &blt_timer.timer[i + 1], sizeof(blt_time_event_t)); in blt_soft_timer_delete_by_index()
116 if (blt_timer.timer[i].cb == func) { in blt_soft_timer_delete()
[all …]
/device/soc/hisilicon/hi3751v350/sdk_linux/source/common/drv/osal/
Dosal_timer.c47 int osal_timer_init(osal_timer *timer) in osal_timer_init() argument
51 if (timer == NULL) { in osal_timer_init()
66 timer->timer = t; in osal_timer_init()
71 int osal_timer_set(osal_timer *timer, unsigned long interval) in osal_timer_set() argument
74 if ((timer == NULL) || (timer->timer == NULL) || (timer->handler == NULL) || (interval == 0)) { in osal_timer_set()
78 t = timer->timer; in osal_timer_set()
80 t->function = (void (*)(struct timer_list *))timer->handler; in osal_timer_set()
82 t->function = timer->handler; in osal_timer_set()
83 t->data = timer->data; in osal_timer_set()
89 int osal_timer_del(osal_timer *timer) in osal_timer_del() argument
[all …]
/device/soc/hisilicon/hi3516dv300/sdk_linux/drv/osal/linux/
Dosal_timer.c45 int osal_timer_init(osal_timer_t *timer) in osal_timer_init() argument
49 if (timer == NULL) { in osal_timer_init()
60 t->data = timer->data; in osal_timer_init()
61 timer_setup(&t->time_list, (timer_callback_fun)timer->function, 0); in osal_timer_init()
62 timer->timer = t; in osal_timer_init()
66 int osal_set_timer(osal_timer_t *timer, unsigned long interval) in osal_set_timer() argument
69 if ((timer == NULL) || (timer->timer == NULL) || (timer->function == NULL) || (interval == 0)) { in osal_set_timer()
73 list_info = (struct timer_list_info *)timer->timer; in osal_set_timer()
74 list_info->data = timer->data; in osal_set_timer()
75 list_info->time_list.function = (timer_callback_fun)timer->function; in osal_set_timer()
[all …]
/device/soc/esp/esp32/components/hal/
Dmcpwm_hal.c31 void mcpwm_hal_timer_start(mcpwm_hal_context_t *hal, int timer) in mcpwm_hal_timer_start() argument
33 mcpwm_ll_timer_start(hal->dev, timer); in mcpwm_hal_timer_start()
36 void mcpwm_hal_timer_stop(mcpwm_hal_context_t *hal, int timer) in mcpwm_hal_timer_stop() argument
38 mcpwm_ll_timer_stop(hal->dev, timer); in mcpwm_hal_timer_stop()
41 void mcpwm_hal_timer_update_basic(mcpwm_hal_context_t *hal, int timer) in mcpwm_hal_timer_update_basic() argument
43 mcpwm_ll_timer_set_prescale(hal->dev, timer, hal->timer[timer].timer_prescale); in mcpwm_hal_timer_update_basic()
45 uint32_t period = MCPWM_BASE_CLK / (hal->timer[timer].freq * in mcpwm_hal_timer_update_basic()
46 (hal->prescale +1) * (hal->timer[timer].timer_prescale + 1)); in mcpwm_hal_timer_update_basic()
47 mcpwm_ll_timer_set_period(hal->dev, timer, period); in mcpwm_hal_timer_update_basic()
49 hal->timer[timer].freq = MCPWM_BASE_CLK / (period * in mcpwm_hal_timer_update_basic()
[all …]
/device/board/isoftstone/yangfan/common/mqtt/mqttclient_c/src/
DMQTTClient.c35 static int sendPacket(MQTTClient* c, int length, Timer* timer) in sendPacket() argument
39 bool isexpired = TimerIsExpired(timer); in sendPacket()
41 rc = c->ipstack->mqttwrite(c->ipstack, &c->buf[sent], length, TimerLeftMS(timer)); in sendPacket()
45 isexpired = TimerIsExpired(timer); in sendPacket()
128 static int readPacket(MQTTClient* c, Timer* timer) in readPacket() argument
134 int rc = c->ipstack->mqttread(c->ipstack, c->readbuf, 1, TimerLeftMS(timer)); in readPacket()
143 decodePacket(c, &rem_len, TimerLeftMS(timer)); in readPacket()
154 …rc = c->ipstack->mqttread(c->ipstack, c->readbuf + len, rem_len, TimerLeftMS(timer)) != rem_len)) { in readPacket()
274 Timer timer; in keepalive() local
275 TimerInit(&timer); in keepalive()
[all …]
/device/board/isoftstone/yangfan/common/mqtt/mqttclient_c/src/linux/
DMQTTLinux.c20 void TimerInit(Timer* timer) in TimerInit() argument
22 timer->end_time = (struct timeval){0, 0}; in TimerInit()
25 char TimerIsExpired(Timer* timer) in TimerIsExpired() argument
29 timersub(&timer->end_time, &now, &res); in TimerIsExpired()
34 void TimerCountdownMS(Timer* timer, unsigned int timeout) in TimerCountdownMS() argument
39 timeradd(&now, &interval, &timer->end_time); in TimerCountdownMS()
43 void TimerAddSecond(Timer* timer, unsigned int time) in TimerAddSecond() argument
46 timeradd(&timer->end_time, &interval, &timer->end_time); in TimerAddSecond()
50 void TimerCountdown(Timer* timer, unsigned int timeout) in TimerCountdown() argument
55 timeradd(&now, &interval, &timer->end_time); in TimerCountdown()
[all …]
/device/soc/beken/bk7235/liteos_m/bk_sdk_armino/components/bk_os/liteos_m_mst/
Drtos_pub.c821 beken2_timer_t *timer = (beken2_timer_t *) handle; in timer_callback2() local
823 if(BEKEN_MAGIC_WORD != timer->beken_magic) in timer_callback2()
827 if ( timer->function ) in timer_callback2()
829 timer->function( timer->left_arg, timer->right_arg ); in timer_callback2()
835 beken_timer_t *timer = (beken_timer_t*) handle; in timer_callback1() local
837 if ( timer->function ) in timer_callback1()
839 timer->function( timer->arg); in timer_callback1()
843 bk_err_t rtos_init_oneshot_timer( beken2_timer_t *timer, in rtos_init_oneshot_timer() argument
854 timer->handle = NULL; in rtos_init_oneshot_timer()
861 timer->beken_magic = BEKEN_MAGIC_WORD; in rtos_init_oneshot_timer()
[all …]
/device/soc/rockchip/common/kernel/drivers/gpu/arm/bifrost/
Dmali_kbase_hwcnt_watchdog_if_timer.c54 static void kbasep_hwcnt_watchdog_callback(struct timer_list *const timer) in kbasep_hwcnt_watchdog_callback() argument
57 container_of(timer, struct kbase_hwcnt_watchdog_if_timer_info, in kbasep_hwcnt_watchdog_callback()
64 const struct kbase_hwcnt_watchdog_info *const timer, in kbasep_hwcnt_watchdog_if_timer_enable() argument
69 (void *)timer; in kbasep_hwcnt_watchdog_if_timer_enable()
71 if (WARN_ON(!timer) || WARN_ON(!callback)) in kbasep_hwcnt_watchdog_if_timer_enable()
85 const struct kbase_hwcnt_watchdog_info *const timer) in kbasep_hwcnt_watchdog_if_timer_disable() argument
88 (void *)timer; in kbasep_hwcnt_watchdog_if_timer_disable()
90 if (WARN_ON(!timer)) in kbasep_hwcnt_watchdog_if_timer_disable()
101 const struct kbase_hwcnt_watchdog_info *const timer, u32 const delay_ms) in kbasep_hwcnt_watchdog_if_timer_modify() argument
104 (void *)timer; in kbasep_hwcnt_watchdog_if_timer_modify()
[all …]
Dmali_kbase_utility.h29 static inline void kbase_timer_setup(struct timer_list *timer, in kbase_timer_setup() argument
30 void (*callback)(struct timer_list *timer)) in kbase_timer_setup() argument
33 setup_timer(timer, (void (*)(unsigned long)) callback, in kbase_timer_setup()
34 (unsigned long) timer); in kbase_timer_setup()
36 timer_setup(timer, callback, 0); in kbase_timer_setup()
/device/soc/esp/esp32/components/hal/esp32/include/hal/
Dmcpwm_ll.h103 static inline void mcpwm_ll_timer_set_prescale(mcpwm_dev_t* mcpwm, int timer, uint32_t prescale) in mcpwm_ll_timer_set_prescale() argument
105 mcpwm->timer[timer].period.prescale = prescale; in mcpwm_ll_timer_set_prescale()
120 static inline void mcpwm_ll_timer_set_count_mode(mcpwm_dev_t *mcpwm, int timer, mcpwm_counter_type_… in mcpwm_ll_timer_set_count_mode() argument
122 mcpwm->timer[timer].mode.mode = mode; in mcpwm_ll_timer_set_count_mode()
131 static inline void mcpwm_ll_timer_start(mcpwm_dev_t *mcpwm, int timer) in mcpwm_ll_timer_start() argument
133 mcpwm->timer[timer].mode.start = 2; in mcpwm_ll_timer_start()
142 static inline void mcpwm_ll_timer_stop(mcpwm_dev_t *mcpwm, int timer) in mcpwm_ll_timer_stop() argument
144 mcpwm->timer[timer].mode.start = 0; in mcpwm_ll_timer_stop()
156 static inline void mcpwm_ll_timer_set_period(mcpwm_dev_t *mcpwm, int timer, uint32_t period) in mcpwm_ll_timer_set_period() argument
159 mcpwm->timer[timer].period.period = period - 1; in mcpwm_ll_timer_set_period()
[all …]
/device/soc/asrmicro/asr582x/liteos_m/sdk/rtos/
Dlega_rtos.c402 OSStatus lega_rtos_init_timer(lega_timer_t *timer, uint32_t time_ms, timer_handler_t function, void… in lega_rtos_init_timer() argument
404 timer->function = function; in lega_rtos_init_timer()
405 timer->arg = arg; in lega_rtos_init_timer()
415 timer->handle = timeId; in lega_rtos_init_timer()
420 OSStatus lega_rtos_init_timer_name(lega_timer_t *timer, uint32_t time_ms, timer_handler_t function,… in lega_rtos_init_timer_name() argument
423 if (!timer) { in lega_rtos_init_timer_name()
427 timer->function = function; in lega_rtos_init_timer_name()
429 timer->arg = name; in lega_rtos_init_timer_name()
431 timer->arg = arg; in lega_rtos_init_timer_name()
437 timeId = KalTimerCreate(timer->function, kalType, timer->arg, time_ms); in lega_rtos_init_timer_name()
[all …]
/device/soc/beken/bk7235/liteos_m/bk_sdk_armino/middleware/driver/port/
Dos_port.c161 __bk_weak bk_err_t rtos_start_oneshot_timer(beken2_timer_t *timer) in rtos_start_oneshot_timer() argument
166 __bk_weak bk_err_t rtos_deinit_oneshot_timer(beken2_timer_t *timer) in rtos_deinit_oneshot_timer() argument
171 __bk_weak bk_err_t rtos_stop_oneshot_timer(beken2_timer_t *timer) in rtos_stop_oneshot_timer() argument
176 bool rtos_is_oneshot_timer_init(beken2_timer_t *timer) in rtos_is_oneshot_timer_init() argument
181 bool rtos_is_oneshot_timer_running(beken2_timer_t *timer) in rtos_is_oneshot_timer_running() argument
186 __bk_weak bk_err_t rtos_oneshot_reload_timer(beken2_timer_t *timer) in rtos_oneshot_reload_timer() argument
191 __bk_weak bk_err_t rtos_oneshot_reload_timer_ex(beken2_timer_t *timer, uint32_t time_ms, in rtos_oneshot_reload_timer_ex() argument
197 __bk_weak bk_err_t rtos_init_oneshot_timer(beken2_timer_t *timer, uint32_t time_ms, in rtos_init_oneshot_timer() argument
203 __bk_weak bk_err_t rtos_init_timer(beken_timer_t *timer, uint32_t time_ms, in rtos_init_timer() argument
209 __bk_weak bk_err_t rtos_start_timer(beken_timer_t *timer) in rtos_start_timer() argument
[all …]
/device/board/isoftstone/yangfan/common/mqtt/mqttclient_c/src/freertos/
DMQTTFreeRTOS.c54 void TimerCountdownMS(Timer* timer, unsigned int timeout_ms) in TimerCountdownMS() argument
56 timer->xTicksToWait = timeout_ms / portTICK_PERIOD_MS; /* convert milliseconds to ticks */ in TimerCountdownMS()
57 vTaskSetTimeOutState(&timer->xTimeOut); /* Record the time at which this function was entered. */ in TimerCountdownMS()
61 void TimerCountdown(Timer* timer, unsigned int timeout) in TimerCountdown() argument
63 TimerCountdownMS(timer, timeout * 1000); in TimerCountdown()
67 int TimerLeftMS(Timer* timer) in TimerLeftMS() argument
69 …xTaskCheckForTimeOut(&timer->xTimeOut, &timer->xTicksToWait); /* updates xTicksToWait to the numbe… in TimerLeftMS()
70 return (timer->xTicksToWait < 0) ? 0 : (timer->xTicksToWait * portTICK_PERIOD_MS); in TimerLeftMS()
74 char TimerIsExpired(Timer* timer) in TimerIsExpired() argument
76 return xTaskCheckForTimeOut(&timer->xTimeOut, &timer->xTicksToWait) == pdTRUE; in TimerIsExpired()
[all …]
/device/soc/beken/bk7235/liteos_m/bk_sdk_armino/include/os/
Dos.h138 beken_timer_t timer; /**< OS timer handle */ member
700 bk_err_t rtos_init_timer(beken_timer_t *timer, uint32_t time_ms, timer_handler_t function, void *ar…
701 bk_err_t rtos_init_oneshot_timer(beken2_timer_t *timer,
706 bk_err_t rtos_deinit_oneshot_timer(beken2_timer_t *timer);
707 bk_err_t rtos_stop_oneshot_timer(beken2_timer_t *timer);
708 bool rtos_is_oneshot_timer_running(beken2_timer_t *timer);
709 bk_err_t rtos_start_oneshot_timer(beken2_timer_t *timer);
710 bool rtos_is_oneshot_timer_init(beken2_timer_t *timer);
711 bk_err_t rtos_oneshot_reload_timer(beken2_timer_t *timer);
712 bk_err_t rtos_change_period(beken_timer_t *timer, uint32_t time_ms);
[all …]
/device/soc/rockchip/common/vendor/drivers/gpu/arm/mali400/mali/linux/
Dmali_osk_timers.c23 struct timer_list timer; member
32 timer_setup(&t->timer, (void (*)(struct timer_list *))callback, 0); in _mali_osk_timer_init()
40 tim->timer.expires = jiffies + ticks_to_expire; in _mali_osk_timer_add()
41 add_timer(&(tim->timer)); in _mali_osk_timer_add()
47 mod_timer(&(tim->timer), jiffies + ticks_to_expire); in _mali_osk_timer_mod()
53 del_timer_sync(&(tim->timer)); in _mali_osk_timer_del()
59 del_timer(&(tim->timer)); in _mali_osk_timer_del_async()
65 return timer_pending(&(tim->timer)) == 1; in _mali_osk_timer_pending()
/device/soc/rockchip/common/kernel/drivers/gpu/arm/mali400/mali/linux/
Dmali_osk_timers.c22 struct timer_list timer; member
31 timer_setup(&t->timer, in _mali_osk_timer_init()
39 tim->timer.expires = jiffies + ticks_to_expire; in _mali_osk_timer_add()
40 add_timer(&(tim->timer)); in _mali_osk_timer_add()
46 mod_timer(&(tim->timer), jiffies + ticks_to_expire); in _mali_osk_timer_mod()
52 del_timer_sync(&(tim->timer)); in _mali_osk_timer_del()
58 del_timer(&(tim->timer)); in _mali_osk_timer_del_async()
64 return 1 == timer_pending(&(tim->timer)); in _mali_osk_timer_pending()
/device/soc/bestechnic/bes2600/liteos_m/sdk/bsp/platform/hal/
Dhal_timer.c131 __STATIC_FORCEINLINE uint32_t get_timer_value(struct TIMER_T *timer, uint32_t delta) in get_timer_value() argument
139 v1 = timer->Value; in get_timer_value()
140 v2 = timer->Value; in get_timer_value()
146 return timer->Value; in get_timer_value()
150 __STATIC_FORCEINLINE void clear_timer_irq(struct TIMER_T *timer) in clear_timer_irq() argument
154 timer->IntClr = 1; in clear_timer_irq()
155 } while (timer->RIS & TIMER_RIS_RIS); in clear_timer_irq()
157 timer->IntClr = 1; in clear_timer_irq()
161 __STATIC_FORCEINLINE void set_timer_load(struct TIMER_T *timer, uint32_t load, uint32_t delta) in set_timer_load() argument
169 timer->Load = load; in set_timer_load()
[all …]
/device/board/isoftstone/yangfan/common/mqtt/mqttclient/src/
DMQTTClient.h241 int cycle(Timer& timer);
242 int waitfor(int packet_type, Timer& timer);
244 int publish(int len, Timer& timer, enum QoS qos);
247 int readPacket(Timer& timer);
248 int sendPacket(int length, Timer& timer);
380 int MQTT::Client<Network, Timer, a, b>::sendPacket(int length, Timer& timer) in sendPacket() argument
387 rc = ipstack.write(&sendbuf[sent], length - sent, timer.left_ms()); in sendPacket()
391 if (timer.expired()) // only check expiry after at least one attempt to write in sendPacket()
448 int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::readPacket(Timer& timer) in readPacket() argument
456 rc = ipstack.read(readbuf, 1, timer.left_ms()); in readPacket()
[all …]
/device/board/talkweb/niobe407/applications/003_system_timer/
DREADME_zh.md9 /// Create and Initialize a timer.
12 /// \param[in] argument argument to the timer callback function.
13 /// \param[in] attr timer attributes; NULL: default values.
14 /// \return timer ID for reference by other functions or NULL in case of error.
32 /// Start or restart a timer.
33 /// \param[in] timer_id timer ID obtained by \ref osTimerNew.
34 /// \param[in] ticks \ref CMSIS_RTOS_TimeOutValue "time ticks" value of the timer.
69 /// Create and Initialize a timer.
72 /// \param[in] argument argument to the timer callback function.
73 /// \param[in] attr timer attributes; NULL: default values.
[all …]
/device/board/isoftstone/yangfan/common/mqtt/mqttclient_c/src/cc3200/
DMQTTCC3200.c25 char expired(Timer* timer) { in expired() argument
26 long left = timer->end_time - MilliTimer; in expired()
31 void countdown_ms(Timer* timer, unsigned int timeout) { in countdown_ms() argument
32 timer->end_time = MilliTimer + timeout; in countdown_ms()
36 void countdown(Timer* timer, unsigned int timeout) { in countdown() argument
37 timer->end_time = MilliTimer + (timeout * 1000); in countdown()
41 int left_ms(Timer* timer) { in left_ms() argument
42 long left = timer->end_time - MilliTimer; in left_ms()
47 void InitTimer(Timer* timer) { in InitTimer() argument
48 timer->end_time = 0; in InitTimer()
/device/soc/rockchip/common/vendor/drivers/gpu/arm/bifrost/
Dmali_kbase_utility.h30 …ic inline void kbase_timer_setup(struct timer_list *timer, void (*callback)(struct timer_list *tim… in kbase_timer_setup() argument
33 setup_timer(timer, (void (*)(unsigned long))callback, (unsigned long)timer); in kbase_timer_setup()
35 timer_setup(timer, callback, 0); in kbase_timer_setup()
/device/soc/esp/esp32/components/hal/include/hal/
Dmcpwm_hal.h92 int timer; ///< The timer this operator is using member
105 mcpwm_hal_timer_config_t timer[SOC_MCPWM_TIMER_NUM]; ///< Configuration of the timers member
167 void mcpwm_hal_timer_start(mcpwm_hal_context_t *hal, int timer);
175 void mcpwm_hal_timer_stop(mcpwm_hal_context_t *hal, int timer);
187 void mcpwm_hal_timer_update_basic(mcpwm_hal_context_t *hal, int timer);
196 void mcpwm_hal_timer_enable_sync(mcpwm_hal_context_t *hal, int timer, const mcpwm_hal_sync_config_t…
204 void mcpwm_hal_timer_disable_sync(mcpwm_hal_context_t *hal, int timer);

12345678910>>...14