Skip to content
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

Feature line flags #21

Merged
merged 3 commits into from
Feb 22, 2024
Merged

Feature line flags #21

merged 3 commits into from
Feb 22, 2024

Conversation

d-beamon
Copy link
Contributor

Added a new function called requestInputModeFlags(consumer, flags). It enables the configuration of the flags and it is a binding for the library function gpiod_line_request_input_flags.
Added a new object called LineFlags that include all the flags GPIOD_LINE_REQUEST_FLAG_xxx defined in gpiod.h.

Example:

chip = new gpiod.Chip('gpiochip4');
buttonLine = chip.getLine(BUTTON);
buttonLine.requestInputModeFlags("gpio-basic", gpiod.LineFlags.GPIOD_LINE_REQUEST_FLAG_BIAS_PULL_UP);

d-beamon and others added 3 commits February 21, 2024 22:33
Flags to be used in RequestInputModeFlags
Added declaration of requestInputModeFlags
@d-beamon d-beamon closed this Feb 22, 2024
@d-beamon d-beamon reopened this Feb 22, 2024
@sombriks
Copy link
Owner

Hello @d-beamon , what a nice patch! Thank you!

I am merging your contribution now and work on a proper release in this weekend!

@sombriks sombriks merged commit 67e43ba into sombriks:main Feb 22, 2024
@kccarbone
Copy link

@d-beamon thanks for the contribution! Adding native support for input flags helped cut down a bunch of code in my project. However, I think you may have forgotten to commit the typescript definition for LineFlags... You use it in your example but I'm not seeing it in the latest release.

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.

None yet

3 participants