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

Function ofw_node_index_of_compatible

components/drivers/ofw/base.c:344–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344static int ofw_node_index_of_compatible(const struct rt_ofw_node *np, const char *compatible)
345{
346 int idx = -1;
347 struct rt_ofw_prop *prop = rt_ofw_get_prop(np, "compatible", RT_NULL);
348
349 if (prop)
350 {
351 idx = ofw_prop_index_of_compatible(prop, compatible);
352 }
353
354 return idx;
355}
356
357rt_bool_t rt_ofw_machine_is_compatible(const char *compatible)
358{

Calls 2

rt_ofw_get_propFunction · 0.85

Tested by

no test coverage detected