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!
解決済! 解決策の投稿を見る。
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
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