|
|
1 an în urmă | |
|---|---|---|
| .. | ||
| dtsof.c | 1 an în urmă | |
| img.png | 1 an în urmă | |
| of.h | 1 an în urmă | |
| readme.md | 1 an în urmă | |
1.本例设备树节点 my_backlight {
compatible = "pwm-backlight";
pwms = <&pwm1 0 500000>;
brightness-levels = <0 102 204 306 408 510 612 714 816 918 1020>;
default-brightness = <6>;
status = "okay";
} 2.获取一个元素(of_property_read_u32_index);
函数原型:extern int of_property_read_u32_index(const struct device_node *np,const char *propname, u32 index, u32 *out_value);
3.获取一个数组长度(of_property_count_elems_of_size)
extern int of_property_count_elems_of_size(const struct device_node *np, const char *propname, int elem_size);

4.获取一个数组元素(of_property_read_u32_array)