pimoroni / pimoroni/gpiodevice-python

gpiodevice: deprecate get_pins_for_platform

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3
Forks
3
Avg merge
8h 54m
Merged PRs (30d)
2

Description

Along with get_pins_for_platform, most platform handling code should probably be dropped. It causes more problems than it solves, requiring downstream libraries to maintain a list of supported platforms and pin labels.

If manufacturers want their 40-pin GPIO header to be compatible with gpiod based libraries out of the box, they will need to copy the Raspberry Pi line labelling convention normalised here: https://github.com/raspberrypi/linux/commit/bd9542b8271ccb251490c814e9237ed94d7ceb56

Otherwise, users can just supply their own labels or (LineRequest, offset) tuples to describe the pins they want the library to use. Support for handling the latter case gracefully at the gpiodevice level is in progress here: https://github.com/pimoroni/gpiodevice-python/pull/4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the current get_pins_for_platform implementation and related platform-handling code in gpiodevice-python. Read pull request #4 first, since it covers graceful handling of user-supplied labels or (LineRequest, offset) tuples. Done should align the library with the proposed deprecation and removal of unnecessary platform-specific handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot, operating-systems
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.