Skip to content

Add Linux gpiod plugin#80

Open
QB4-dev wants to merge 9 commits into
Autonomy-Logic:developmentfrom
QB4-dev:development
Open

Add Linux gpiod plugin#80
QB4-dev wants to merge 9 commits into
Autonomy-Logic:developmentfrom
QB4-dev:development

Conversation

@QB4-dev
Copy link
Copy Markdown

@QB4-dev QB4-dev commented Jan 19, 2026

I have created a plugin to support generic Linux gpio using libgpiod(the libgpiod-dev package is required to build). It should provide OpenPLC gpio control on any Linux device with GPIOs. I think it is better way than using hardware dependent libraries like wiringPi

To get it work user should provide IEC address to gpio csv map file like:
File: io-map.csv

IEC_ADDRESS,CHIP_NAME,LINE_IDENTIFIER
%IX0.2,/dev/gpiochip0,GPIO2
%IX0.3,/dev/gpiochip0,GPIO3
%IX0.4,/dev/gpiochip0,GPIO4
%IX0.3,/dev/gpiochip0,GPIO5
%QX0.0,/dev/gpiochip0,GPIO10
%QX0.1,/dev/gpiochip0,GPIO11
%QX0.2,/dev/gpiochip0,GPIO12
%QX0.3,/dev/gpiochip0,GPIO13

And then activate plugin in plugins.conf

GPIOs from map should be controlled by OpenPLC

@thiagoralves
Copy link
Copy Markdown
Contributor

Thank you very much for this PR. This is very interesting, but we might put it on hold for a little bit until we figure out a good way to interface it from the editor in a user friendly way.

@QB4-dev
Copy link
Copy Markdown
Author

QB4-dev commented Jan 21, 2026

Okay. I stuck with tests just because program generated from editor disables my plugin. I see that it is all work in progress.

I'm Linux embedded developer. For my point of view it will be good to create Yocto recipe to build runtime and then supply correct IEC -> GPIO maps depending on target device(machine in Yocto). There is no need to configure I/O from editor

BTW Thank you for your great work

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.

2 participants