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

Function rt_ofw_prop_next_u32

components/drivers/ofw/base.c:1925–1954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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{
1927 if (prop && out_value)
1928 {
1929 if (cur)
1930 {
1931 ++cur;
1932
1933 if ((void *)cur >= prop->value + prop->length)
1934 {
1935 cur = RT_NULL;
1936 }
1937 }
1938 else
1939 {
1940 cur = prop->value;
1941 }
1942
1943 if (cur)
1944 {
1945 *out_value = fdt32_to_cpu(*cur);
1946 }
1947 }
1948 else
1949 {
1950 cur = RT_NULL;
1951 }
1952
1953 return cur;
1954}
1955
1956const char *rt_ofw_prop_next_string(struct rt_ofw_prop *prop, const char *cur)
1957{

Callers 2

ofw_parse_phandle_cellsFunction · 0.85
rt_ofw_count_of_clkFunction · 0.85

Calls 1

fdt32_to_cpuFunction · 0.50

Tested by

no test coverage detected