MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_lptimer_stop

Function rt_lptimer_stop

components/drivers/pm/lptimer.c:75–95  ·  view source on GitHub ↗

lptimer stop */

Source from the content-addressed store, hash-verified

73
74/* lptimer stop */
75rt_err_t rt_lptimer_stop(rt_lptimer_t timer)
76{
77 rt_base_t level;
78 RT_ASSERT(timer != RT_NULL);
79
80 /* disable interrupt */
81 level = rt_hw_interrupt_disable();
82 rt_list_remove(&timer->list);
83 if (rt_timer_stop(&timer->timer) == RT_EOK)
84 {
85 /* enable interrupt */
86 rt_hw_interrupt_enable(level);
87 return RT_EOK;
88 }
89 else
90 {
91 /* enable interrupt */
92 rt_hw_interrupt_enable(level);
93 return -RT_ERROR;
94 }
95}
96
97rt_err_t rt_lptimer_control(rt_lptimer_t timer, int cmd, void *arg)
98{

Callers

nothing calls this directly

Calls 4

rt_list_removeFunction · 0.85
rt_timer_stopFunction · 0.85
rt_hw_interrupt_disableFunction · 0.50
rt_hw_interrupt_enableFunction · 0.50

Tested by

no test coverage detected