Android LL GPIO export automatically at startup

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Android LL GPIO export automatically at startup

2,082件の閲覧回数
kamilbystryk
Contributor III

How can I set automatically export and change direction of GPIO at start Android (5.0.2). I want to avoid the need to manual entering:

echo 140 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio140/direction

commands in root console.

ラベル(2)
0 件の賞賛
返信
2 返答(返信)

1,256件の閲覧回数
kamilbystryk
Contributor III

Problem solved - by mistake I put code in wrong section of init.rc:

write /sys/class/gpio/export 142

write /sys/class/gpio/gpio142/direction out

chmod 777 /sys/class/gpio/gpio142/value

0 件の賞賛
返信

1,256件の閲覧回数
jerry2
Contributor II

Hello,

In which section did you insert these commands in the init.rc?

on boot?

0 件の賞賛
返信