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

Function rt_link_dev_init

components/utilities/rt-link/src/rtlink_dev.c:223–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223rt_err_t rt_link_dev_init(rt_device_t dev)
224{
225 RT_ASSERT(dev != RT_NULL);
226
227 dev->rx_indicate = RT_NULL;
228 dev->tx_complete = RT_NULL;
229
230 struct rt_link_device *rtlink = (struct rt_link_device *)dev;
231 rtlink->service.service = RT_LINK_SERVICE_MAX;
232 rtlink->service.recv_cb = RT_NULL;
233 rtlink->service.send_cb = RT_NULL;
234 rtlink->service.timeout_tx = RT_WAITING_NO;
235 rtlink->service.user_data = (void *)dev;
236
237 rt_slist_init(&rtlink->recv_head);
238 return RT_EOK;
239}
240
241rt_err_t rt_link_dev_open(rt_device_t dev, rt_uint16_t oflag)
242{

Callers

nothing calls this directly

Calls 1

rt_slist_initFunction · 0.85

Tested by

no test coverage detected