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

Function rt_ofw_prop_index_of_string

components/drivers/ofw/base.c:1902–1923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1900}
1901
1902int rt_ofw_prop_index_of_string(const struct rt_ofw_node *np, const char *propname, const char *string)
1903{
1904 int idx;
1905
1906 if (np && propname && string)
1907 {
1908 struct rt_ofw_prop *prop = rt_ofw_get_prop(np, propname, RT_NULL);
1909
1910 idx = -1;
1911
1912 if (prop)
1913 {
1914 idx = ofw_prop_index_of_string(prop, string, ofw_strcmp);
1915 }
1916 }
1917 else
1918 {
1919 idx = -RT_EINVAL;
1920 }
1921
1922 return idx;
1923}
1924
1925const fdt32_t *rt_ofw_prop_next_u32(struct rt_ofw_prop *prop, const fdt32_t *cur, rt_uint32_t *out_value)
1926{

Callers 6

rt_ofw_get_irq_by_nameFunction · 0.85
rt_ofw_get_clk_by_nameFunction · 0.85
ofw_find_dma_controllerFunction · 0.85
rt_mbox_request_by_nameFunction · 0.85

Calls 2

rt_ofw_get_propFunction · 0.85
ofw_prop_index_of_stringFunction · 0.85

Tested by

no test coverage detected