Make possible slots for Pmods more flexible.
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Erlang
- Stars
- 323
- Forks
- 44
- Avg merge
- 6h 37m
- Merged PRs (30d)
- 6
Description
In most Pmod drivers the slots are hard coded. We should keep the slots as flexible as possible.
Example:
The PmodALS should work on spi1 too, but in the code we have:
init([Slot = spi2, Opts]) ->
ok = grisp_devices:register(Slot, ?MODULE),
{ok, #state{options = Opts}};
init(Slot) ->
error({incompatible_slot, Slot}).
Contributor guide
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 locating the PmodALS driver and its init/slot handling, then compare the corresponding slot checks in other Pmod drivers. Determine how slots such as spi1 and spi2 are represented and how incompatible slots should still be rejected. Done means supported Pmods can use flexible compatible slots without hard-coded restrictions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- erlang
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100