How to get gpio value when I change it.

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

How to get gpio value when I change it.

1,241件の閲覧回数
sijian_cai
Contributor I

In imx6ul , I use gpio 19 for test , if I make the dir to out , and then I echo 1 or 0 to value , I can get the correct status by multimeter , but how can I get the gpio value in the use space ? And may I read the register value ? Thanks a lot.

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

1,029件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi,

An option could be using boolean variables for the pin values, and using those variables to assign the pin values and to know the pin status.

Additionally, you could find some complementary information at the link below:

Access GPIO from Linux user space

Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,029件の閲覧回数
BiyongSUN
NXP Employee
NXP Employee
0 件の賞賛
返信