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

Function _get_interface_by_name

components/drivers/phy/ofw.c:56–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54};
55
56static rt_err_t _get_interface_by_name(const char *name, rt_phy_interface *interface)
57{
58 for (int i = 0; i < RT_PHY_INTERFACE_MODE_MAX; i++)
59 {
60 if (!strcmp(name, rt_phy_modes[i]))
61 {
62 *interface = i;
63 return RT_EOK;
64 }
65 }
66 return -RT_ERROR;
67}
68
69rt_err_t rt_ofw_get_interface(struct rt_ofw_node *np, rt_phy_interface *interface)
70{

Callers 1

rt_ofw_get_interfaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected