how to get access to GPIO in user space from c coding

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

how to get access to GPIO in user space from c coding

ソリューションへジャンプ
2,079件の閲覧回数
sachindhoundiya
Contributor II

hello all,

I have get the access of GPIO from terminal and check the value in CRO

example :

echo 19 >/sys/class/gpio/export
echo out >/sys/class/gpio/gpio19/direction
echo 1 >/sys/class/gpio/gpio19/value
echo 0 >/sys/class/gpio/gpio19/value
echo 19 >/sys/class/gpio/unexport

but can any suggest me how to write c code and compile it on imx6ulevk board from user space.

what is to done i want to make a recipes or it will be done by simple make-file. 

0 件の賞賛
返信
1 解決策
1,427件の閲覧回数
Yuri
NXP Employee
NXP Employee

Hello,

  You may look at the following:

Introduction to accessing the Raspberry Pi's GPIO in C++ (sysfs) · Hertaville.com 

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,428件の閲覧回数
Yuri
NXP Employee
NXP Employee

Hello,

  You may look at the following:

Introduction to accessing the Raspberry Pi's GPIO in C++ (sysfs) · Hertaville.com 

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信