How to use USER1 USER2 Βuttons on i.MX53 lucid linux 10.04LTS

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

How to use USER1 USER2 Βuttons on i.MX53 lucid linux 10.04LTS

ソリューションへジャンプ
1,188件の閲覧回数
TKs
Contributor II

Hi,

I want to use USER1 and USER2 Buttons.

If I push the USER2 button I want that a file named "text.txt" been copied from usb to home folder (after it is done a sound will be played).

If I press USER1 button a sh script will launch.

Any idea how to manage this?

Thanks in advance!

ラベル(2)
0 件の賞賛
返信
1 解決策
1,014件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

HI Christos

please look at below link

Using USERDEF1 and USERDEF2 GPIO's on IMX53 Ubuntu

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,015件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

HI Christos

please look at below link

Using USERDEF1 and USERDEF2 GPIO's on IMX53 Ubuntu

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
1,014件の閲覧回数
TKs
Contributor II

thank you Igor!
much appreciated !

Now I get the following error

bash: echo: write error: Device or resource busy

I read that I have to unbind it with:

cd /sys/bus/platform/drivers/  XXX-gpio ; echo XXX-gpio >unbind

but which is our XXX name file for the volume control?

thanks!

EDIT (Solved):

(gpio-46 is USER1/Volume up and gpio-47 is USER2/Volume down, to confirm: cat /sys/kernel/debug/gpio)

here is what I did

cd /sys/bus/platform/drivers/gpio-keys

echo gpio-keys > unbind

echo 46 > /sys/class/gpio/export

with

cat /sys/class/gpio/gpio46/value

we get the value

0 件の賞賛
返信