Skip to content

Add conversion from physical PIN to BCM notation. #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lexa
Copy link

@lexa lexa commented Apr 26, 2020

On Open() detect the board model and configure how physical PINs are
mapped to GPIO pin numbers [1].

Model detection is based on content of
/sys/firmware/devicetree/base/model [2] .

If you are running a weird or very old system which does not have the file, GetBoardPin() won't work.

[1] https://pinout.xyz/
[2] https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md

Aleksei Fedotov added 2 commits April 26, 2020 18:54
On Open() detect the board model and configure how physical PINs are
mapped to GPIO pin numbers [1].

Model detection is based on content of
/sys/firmware/devicetree/base/model [2] . If you are running a weird or
very old system which does not have the file, GetBoardPin() won't work.

[1] https://pinout.xyz/
[2] https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
The behavior of the test is not changed, now it hides BCM bin number and
used physical PIN number.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant