Skip to content

Conversation

@gsexton
Copy link
Contributor

@gsexton gsexton commented Jan 18, 2025

Fixes #30

The idea behind this interface is to give users a way to atomically modify multiple GPIO pins in one transaction.

This is essentially the interface for the LineSet I created for the IOCTL based GPIO. I'll have another PR coming to make the gpioioctl LineSet implement this interface.

I'll be adding this interface to the MCP23008, and implementing it in a future driver for a CP-2112, and MCP2201, etc. Using this Group() will make writing GPIO Backpacks for things like LCDs trivial. We can have one HD44780 GPIOBackpack that takes a Group, along with a reset and Enable pin.

@codecov
Copy link

codecov bot commented Jan 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.7%. Comparing base (e01555d) to head (ab96a60).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main     #43   +/-   ##
=====================================
  Coverage   93.7%   93.7%           
=====================================
  Files         34      34           
  Lines       3930    3930           
=====================================
  Hits        3681    3681           
  Misses       244     244           
  Partials       5       5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@maruel maruel left a comment

Choose a reason for hiding this comment

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

Sounds good, thanks! I wanted to design that for years (literally) for the case of ft232h but never got around it. This looks good.

@gsexton gsexton merged commit fe954c0 into periph:main Jan 27, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

gpio: add Group interface, to act on multiple GPIO as a single transaction

2 participants