提交 fea7d02b 编写于 作者: M mbbill@gmail.com

update lwip1.4 for old drivers compatibility

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1714 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 40567855
......@@ -81,6 +81,37 @@ static char eth_rx_thread_mb_pool[RT_LWIP_ETHTHREAD_MBOX_SIZE * 4];
static char eth_rx_thread_stack[RT_LWIP_ETHTHREAD_STACKSIZE];
/* Ugly hacks for old drivers compatible */
/* ===================================== */
#if 1
static struct eth_device * ptmpdev;
struct eth_device * get_eth_dev(void)
{
return ptmpdev;
}
int eth_device_init(struct eth_device * dev, char *name)
{
ptmpdev = dev;
dev->parent.type = RT_Device_Class_NetIf;
rt_device_register(&(dev->parent), "eth0", RT_DEVICE_FLAG_RDWR);
return 0;
}
void lwip_sys_init(void)
{
lwip_enetif_init();
}
void eth_system_device_init()
{
}
rt_err_t eth_device_ready(struct eth_device* dev)
{
return eth_rx_ready(dev);
}
#endif
/* ===================================== */
/* ethernet buffer */
static void eth_rx_thread_entry(void* parameter)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册