Skip to content

Fix Pullup/Pulldown setting in LibgpiodV2#2476

Open
pgrawehr wants to merge 18 commits intodotnet:mainfrom
pgrawehr:GpioFixing1
Open

Fix Pullup/Pulldown setting in LibgpiodV2#2476
pgrawehr wants to merge 18 commits intodotnet:mainfrom
pgrawehr:GpioFixing1

Conversation

@pgrawehr
Copy link
Contributor

@pgrawehr pgrawehr commented Feb 22, 2026

Fixes #2475, #2461

The "bias" mode setting on the LibgpiodV2 driver wasn't working correctly. There where two main issues:

  • When setting the mode to PullUp or PullDown, the pin needs to be (also) set to input.
  • When changing the mode (while the pin was kept open) the change was not applied because there was an early abort when the mode was already set to input.
Microsoft Reviewers: Open in CodeFlow

@dotnet-policy-service dotnet-policy-service bot added the area-System.Device.Gpio Contains types for using general-purpose I/O (GPIO) pins label Feb 22, 2026
Copy link
Member

@Ellerbach Ellerbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and I know you've been testing all this on real hardware.

@raffaeler
Copy link
Contributor

Let's talk about it, my Pi5 is complaining with libgpiod2 detection used in all the tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Device.Gpio Contains types for using general-purpose I/O (GPIO) pins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Libgpiod3 support

3 participants