系统启动时PG0、PG1、PG2都被设置了高电平,请问在哪里设置的,我需要更改为低电平
离线
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
leds {
compatible = "gpio-leds";
blue_led {
label = "licheepi:blue:usr";
gpios = <&pio 6 1 GPIO_ACTIVE_LOW>; /* PG1 */
};
green_led {
label = "licheepi:green:usr";
gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
default-state = "on";
};
red_led {
label = "licheepi:red:usr";
gpios = <&pio 6 2 GPIO_ACTIVE_LOW>; /* PG2 */
};
};
离线
https://github.com/Lichee-Pi/linux/blob/zero-4.13.y/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts
leds { compatible = "gpio-leds"; blue_led { label = "licheepi:blue:usr"; gpios = <&pio 6 1 GPIO_ACTIVE_LOW>; /* PG1 */ }; green_led { label = "licheepi:green:usr"; gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */ default-state = "on"; }; red_led { label = "licheepi:red:usr"; gpios = <&pio 6 2 GPIO_ACTIVE_LOW>; /* PG2 */ }; };
这个文件我已经更改过了,都是给的低电平,但是我系统启动后,还是变成了高电平
离线
我是这样配置的
离线
好的好的,我先试一下,谢谢大神
离线
问题解决了,可能是因为我一开始把defaul-state=“on”给注释掉了,因为这个导致我的设置没有生效,把这句话启用就好了
离线