pimoroni / pimoroni/gpiodevice-python
gpiodevice: deprecate get_pins_for_platform
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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