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,675 次查看
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,501 次查看
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,502 次查看
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,501 次查看
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 项奖励
回复