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

Function rt_ofw_get_prop

components/drivers/ofw/base.c:1767–1788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1765
1766
1767struct rt_ofw_prop *rt_ofw_get_prop(const struct rt_ofw_node *np, const char *name, rt_ssize_t *out_length)
1768{
1769 struct rt_ofw_prop *prop = RT_NULL;
1770
1771 if (np && name)
1772 {
1773 rt_ofw_foreach_prop(np, prop)
1774 {
1775 if (!rt_strcmp(prop->name, name))
1776 {
1777 if (out_length)
1778 {
1779 *out_length = prop->length;
1780 }
1781
1782 break;
1783 }
1784 }
1785 }
1786
1787 return prop;
1788}
1789
1790#define OFW_PROP_READ_UXX_ARRAY_INDEX(bit) \
1791int rt_ofw_prop_read_u##bit##_array_index( \

Calls 1

rt_strcmpFunction · 0.85

Tested by

no test coverage detected