Use `none` atom instead of `-1` for unused pins

Open
#2,441 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
erlang
Domain
embedded-iot

Research direction

The issue identifies unused SPI pins such as MOSI and MISO, but does not name the files or tests where -1 is used. Start by locating the pin handling code and checking the related issues #2438 and #2435 for context. Done when unused pins use the none atom consistently and relevant tests or examples reflect the change.

Written by the indexing model from the issue text.

Description

Right now -1 is used when a PIN is not used (e.g. MOSI or MISO on SPI). We should rather use none atom that is more idiomatic.

See also #2438 and #2435

Dominant language
Erlang
Stars
2.3k
Forks
171
Avg merge
4d 11h
Merged PRs (30d)
20

Getting set up

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.

More from atomvm/AtomVM

All issues in atomvm/AtomVM

Similar issues

More Embedded & IoT issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.