Merge pull request #3296 from ChazJin/patch-5

Fix bug for drv_enet.c
This commit is contained in:
Bernard Xiong 2020-01-26 20:51:14 +08:00 committed by GitHub
commit c95987e757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -653,6 +653,9 @@ int rt_hw_gd32_eth_init(void)
rt_sem_init(&gd32_emac_device0.tx_buf_free, "tx_buf0", EMAC_TXBUFNB, RT_IPC_FLAG_FIFO);
eth_device_init(&(gd32_emac_device0.parent), "e0");
/* change device link status */
eth_device_linkchange(&(gd32_emac_device0.parent), RT_TRUE);
return 0;
}
INIT_DEVICE_EXPORT(rt_hw_gd32_eth_init);