| 221 | } |
| 222 | |
| 223 | rt_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 | |
| 241 | rt_err_t rt_link_dev_open(rt_device_t dev, rt_uint16_t oflag) |
| 242 | { |
nothing calls this directly
no test coverage detected