| 1923 | } |
| 1924 | |
| 1925 | const 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 | |
| 1956 | const char *rt_ofw_prop_next_string(struct rt_ofw_prop *prop, const char *cur) |
| 1957 | { |
no test coverage detected