Request to add an async interface for i2c slave device

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

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
embedded-iot

Research direction

Start by reviewing the existing async I2C master interface in embedded-hal and the surrounding I2C traits. Define how a slave receives a caller-provided buffer, reports the received length and slave address, and signals messages that exceed the buffer; done means the interface is specified and covered by appropriate tests.

Written by the indexing model from the issue text.

Description

The current async interface targets an I2C Master.

Hereby I propose to also create an async interface for an I2C slave device.

It would be nice that the length of on incoming message is flexible, (controlled by the master, not by the slave).
The slave does get a buffer from the software, big enough to contain all possible incoming messages.
If the master does send more than the size of the buffer, an error is raised.
At the end of an I2C message, the actual length of the received bytes, and the actual slave address should be reported to the software.

Dominant language
Rust
Stars
2.7k
Forks
282
PR merge metrics
No merged PRs in 30d

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.

More from rust-embedded/embedded-hal

All issues in rust-embedded/embedded-hal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.