您尚未登录。

楼主 #1 2019-12-25 16:52:40

豆豆麻麻
会员
注册时间: 2019-09-28
已发帖子: 8
积分: 8

请问荔枝派zero在系统启动时PG0设置了高电平

系统启动时PG0、PG1、PG2都被设置了高电平,请问在哪里设置的,我需要更改为低电平

离线

#2 2019-12-25 17:01:01

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,244
积分: 9197

Re: 请问荔枝派zero在系统启动时PG0设置了高电平

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 */
                };
        };




在线

楼主 #3 2019-12-25 17:16:01

豆豆麻麻
会员
注册时间: 2019-09-28
已发帖子: 8
积分: 8

Re: 请问荔枝派zero在系统启动时PG0设置了高电平

晕哥 说:

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 */
                };
        };

这个文件我已经更改过了,都是给的低电平,但是我系统启动后,还是变成了高电平

离线

楼主 #4 2019-12-25 17:21:54

豆豆麻麻
会员
注册时间: 2019-09-28
已发帖子: 8
积分: 8

Re: 请问荔枝派zero在系统启动时PG0设置了高电平

QQ图片20191225172003.png

我是这样配置的

离线

#5 2019-12-25 17:22:28

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,244
积分: 9197

Re: 请问荔枝派zero在系统启动时PG0设置了高电平

把这一段全删了





在线

楼主 #6 2019-12-25 17:46:35

豆豆麻麻
会员
注册时间: 2019-09-28
已发帖子: 8
积分: 8

Re: 请问荔枝派zero在系统启动时PG0设置了高电平

好的好的,我先试一下,谢谢大神

离线

楼主 #7 2019-12-26 11:54:22

豆豆麻麻
会员
注册时间: 2019-09-28
已发帖子: 8
积分: 8

Re: 请问荔枝派zero在系统启动时PG0设置了高电平

问题解决了,可能是因为我一开始把defaul-state=“on”给注释掉了,因为这个导致我的设置没有生效,把这句话启用就好了

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn