grisp / grisp/grisp

Make possible slots for Pmods more flexible.

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

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

Open the contributing guide

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.