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

Function rt_hw_ft2004_eth_init

bsp/ft2004/drivers/drv_eth.c:663–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

661}
662
663static int rt_hw_ft2004_eth_init(void)
664{
665 rt_err_t state = RT_EOK;
666
667#ifdef BSP_USING_GMAC0
668 os_drv_gmac0.Gmac.Config.InstanceId = 0;
669 state = rt_hw_gmac_init(&os_drv_gmac0, os_drv_gmac0_name);
670 if (RT_EOK != state)
671 {
672 goto __exit;
673 }
674#endif
675
676#ifdef BSP_USING_GMAC1
677 os_drv_gmac1.Gmac.Config.InstanceId = 1;
678 state = rt_hw_gmac_init(&os_drv_gmac1, os_drv_gmac1_name);
679 if (RT_EOK != state)
680 {
681 goto __exit;
682 }
683#endif
684
685__exit:
686 return state;
687}
688
689INIT_DEVICE_EXPORT(rt_hw_ft2004_eth_init);
690

Callers

nothing calls this directly

Calls 1

rt_hw_gmac_initFunction · 0.70

Tested by

no test coverage detected