Skip to content

Conversation

@Gadgetoid
Copy link
Member

Client libraries will use get_pin() to resolve a user-supplied or default pin label to a gpiochip and line offset.

This is intended to fix the issues with Buster not including pin labels - pimoroni/enviroplus-python#137 - though we do not want to make a habit of supporting anything older than Bullseye.

This should also fix other cases where a user supplies a (LineRequest, offset) tuple instead of a "GPIO27" label. Since the user has already done the legwork of requesting the pin and supplying it to the library, we can return it verbatim. This avoids having to handle this behaviour in every client library.

Client libraries will use get_pin() to resolve a user-supplied or
default pin label to a gpiochip and line offset.

If the user decides to supply a LineRequest, offset tuple instead,
then simply return it. This avoids having to handle this behaviour
in every client library.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8802799399

Details

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.4%) to 41.743%

Changes Missing Coverage Covered Lines Changed/Added Lines %
gpiodevice/init.py 0 2 0.0%
Totals Coverage Status
Change from base Build 7960077441: -0.4%
Covered Lines: 91
Relevant Lines: 218

💛 - Coveralls

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.

3 participants