How to get gpio value when I change it.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get gpio value when I change it.

1,245 Views
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.

Labels (1)
0 Kudos
Reply
2 Replies

1,033 Views
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 Kudos
Reply

1,033 Views
BiyongSUN
NXP Employee
NXP Employee
0 Kudos
Reply