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

Function rt_ofw_get_interface

components/drivers/phy/ofw.c:69–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69rt_err_t rt_ofw_get_interface(struct rt_ofw_node *np, rt_phy_interface *interface)
70{
71 const char *phy_mode = RT_NULL;
72
73 if (rt_ofw_prop_read_string(np, "phy-mode", &phy_mode))
74 rt_ofw_prop_read_string(np, "phy-connection-type", &phy_mode);
75 if (!phy_mode)
76 return -RT_ERROR;
77
78 return _get_interface_by_name(phy_mode, interface);
79}
80
81rt_err_t rt_ofw_get_mac_addr_by_name(struct rt_ofw_node *np, const char *name, rt_uint8_t *addr)
82{

Callers

nothing calls this directly

Calls 2

rt_ofw_prop_read_stringFunction · 0.85
_get_interface_by_nameFunction · 0.85

Tested by

no test coverage detected