SAMA5D3 Environmental Testing Gpio--yx test

Source: Internet
Author: User

Description

Gpio map Relationship yx0--20 yx1--16 yx2--12 yx3--10 yx4--14 yx5--4 yx6--2 yx7--0

Use cat mode to capture the level, if the character ' 1 ', means the input node is not closed, if the character ' 0 ', representing the external input node closed,

1 Configuring Gpio

[Email protected]:~ echo >/sys/class/gpio/export
[Email protected]:~ echo >/sys/class/gpio/export
[Email protected]:~ echo >/sys/class/gpio/export
[Email protected]:~ echo >/sys/class/gpio/export
[Email protected]:~ echo 4 >/sys/class/gpio/export
[Email protected]:~ echo 2 >/sys/class/gpio/export
[Email protected]:~ echo 0 >/sys/class/gpio/export

2 Configuring the direction of the Gpio--input

[Email protected]: echo in >/sys/class/gpio/pioa20/direction
[Email protected]: echo in >/sys/class/gpio/pioa16/direction
[Email protected]: echo in >/sys/class/gpio/pioa12/direction
[Email protected]: echo in >/sys/class/gpio/pioa10/direction
[Email protected]: echo in >/sys/class/gpio/pioa14/direction
[Email protected]: echo in >/sys/class/gpio/pioa4/direction
[Email protected]: echo in >/sys/class/gpio/pioa2/direction
[Email protected]: echo in >/sys/class/gpio/pioa0/direction

3 Capture Level:

[Email protected]: cat/sys/class/gpio/pioa20/value//If the character ' 1 ' is returned, the input node is not closed, if it is the character ' 0 ', the external input node is closed

[Email protected]: Cat/sys/class/gpio/pioa16/value

[Email protected]: Cat/sys/class/gpio/pioa12/value

[Email protected]: Cat/sys/class/gpio/pioa10/value

[Email protected]: Cat/sys/class/gpio/pioa4/value

[Email protected]: Cat/sys/class/gpio/pioa2/value

[Email protected]: Cat/sys/class/gpio/pioa0/value

SAMA5D3 Environmental Testing Gpio--yx test

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.