fix(demo): move dhcp_start in init
Signed-off-by: sakumisu <1203593632@qq.com>
This commit is contained in:
@@ -276,7 +276,8 @@ void cdc_ecm_lwip_init(void)
|
||||
|
||||
eth_device_init(&cdc_ecm_dev, "u0");
|
||||
|
||||
eth_device_linkchange(&cdc_ecm_dev, RT_FALSE);
|
||||
eth_device_linkchange(&cdc_ecm_dev, RT_TRUE);
|
||||
dhcpd_start("u0");
|
||||
}
|
||||
|
||||
void usbd_cdc_ecm_data_recv_done(uint32_t len)
|
||||
@@ -439,10 +440,6 @@ static void usbd_event_handler(uint8_t busid, uint8_t event)
|
||||
case USBD_EVENT_SUSPEND:
|
||||
break;
|
||||
case USBD_EVENT_CONFIGURED:
|
||||
#ifdef RT_USING_LWIP
|
||||
eth_device_linkchange(&cdc_ecm_dev, RT_TRUE);
|
||||
dhcpd_start("u0");
|
||||
#endif
|
||||
break;
|
||||
case USBD_EVENT_SET_REMOTE_WAKEUP:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user