Reading the User buttons (KEY1, KEY2, etc..)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Reading the User buttons (KEY1, KEY2, etc..)

1,459 次查看
blsousan
Contributor III

I have my iMX28EVK booting and mounting the rootfs from the host PC.  I found that I can control the LED's (LED2 and LED3 on the eval board) by writing the value of 0 - 255 to:

 

/sys/devices/platform/mxs-leds.0/leds/led-pwm0/brightness

 

So is there a similar file in the /sys directory where one can read the status of the user buttons?  Reading through the docs it looks like the user buttons are routed through LRADC1  (analog to digital converter) and will generate specific digital values that represent each button. 

 

Bills

标签 (1)
2 回复数

1,264 次查看
blsousan
Contributor III

I found out how to read the buttons.  Simply read from the /dev/input/event0.  It generates a stream of data every time one of the buttons is pressed.

1,264 次查看
andreass_
Contributor III

Hi Bill,

one question. How do you find out which button is pressed?
I see no differences between the different buttons.

Could you help me?

Thanks

0 项奖励
回复