How to get gpio value when I change it.

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

How to get gpio value when I change it.

1,236 次查看
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,024 次查看
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,024 次查看
BiyongSUN
NXP Employee
NXP Employee
0 项奖励
回复