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

Function timer_callback

components/drivers/wlan/dev_wlan_lwip.c:123–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static void timer_callback(void *parameter)
124{
125#ifdef RT_WLAN_WORK_THREAD_ENABLE
126 struct rt_workqueue *workqueue;
127 struct rt_wlan_device *wlan = parameter;
128 struct lwip_prot_des *lwip_prot = (struct lwip_prot_des *)wlan->prot;
129 struct rt_work *work;
130 rt_base_t level;
131
132 if (lwip_prot == RT_NULL)
133 return;
134
135 work = &lwip_prot->work;
136 workqueue = rt_wlan_get_workqueue();
137 if (workqueue != RT_NULL)
138 {
139 level = rt_hw_interrupt_disable();
140 rt_work_init(work, netif_is_ready, parameter);
141 rt_hw_interrupt_enable(level);
142 if (rt_workqueue_dowork(workqueue, work) != RT_EOK)
143 {
144 level = rt_hw_interrupt_disable();
145 rt_memset(work, 0, sizeof(struct rt_work));
146 rt_hw_interrupt_enable(level);
147 }
148 }
149#else
150 netif_is_ready(RT_NULL, parameter);
151#endif
152
153}
154
155static void netif_set_connected(void *parameter)
156{

Callers

nothing calls this directly

Calls 7

rt_wlan_get_workqueueFunction · 0.85
rt_work_initFunction · 0.85
rt_workqueue_doworkFunction · 0.85
rt_memsetFunction · 0.85
netif_is_readyFunction · 0.85
rt_hw_interrupt_disableFunction · 0.50
rt_hw_interrupt_enableFunction · 0.50

Tested by

no test coverage detected