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

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

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

801件の閲覧回数
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 返答(返信)

606件の閲覧回数
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.

606件の閲覧回数
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 件の賞賛