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

Function rt_phy_driver_register

components/drivers/phy/phy.c:520–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518}
519
520rt_err_t rt_phy_driver_register(struct rt_phy_driver *pdrv)
521{
522 RT_ASSERT(pdrv != RT_NULL);
523
524 pdrv->parent.bus = &rt_phy_bus;
525#if RT_NAME_MAX > 0
526 rt_strcpy(pdrv->parent.parent.name, pdrv->name);
527#else
528 pdrv->parent.parent.name = pdrv->name;
529#endif
530
531 return rt_driver_register(&pdrv->parent);
532}
533
534static rt_bool_t phy_match(rt_driver_t drv, rt_device_t dev)
535{

Callers

nothing calls this directly

Calls 2

rt_strcpyFunction · 0.85
rt_driver_registerFunction · 0.85

Tested by

no test coverage detected