Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C slave mode support #636

Open
tgross35 opened this issue Nov 3, 2022 · 4 comments
Open

I2C slave mode support #636

tgross35 opened this issue Nov 3, 2022 · 4 comments

Comments

@tgross35
Copy link
Contributor

tgross35 commented Nov 3, 2022

What would be needed to support i2c slave mode? It seems like there is a lot of overlap with i2c master, but I am not sure what the structure would look like.

Register summary is in section 36.7 of the datasheet

@sajattack
Copy link
Member

I think the main reason we don't have it yet is mainly a lack of standardization for the interface in the embedded-hal crate (last I checked). But that's not exactly a good reason why we can't or shouldn't support it.

@tgross35
Copy link
Contributor Author

tgross35 commented Nov 4, 2022

Now that it looks like embedded-hal-bus is going to be split off, I wonder if it will cover it better. The details about what HAL 1.0 are going to look like are unfortunately iffy at best it seems.

Err... I'm pretty new to the project, could you point me in the right direction for where to start adding something like this?

@sajattack
Copy link
Member

If I were to do it, I would create a slave module under the existing i2c directory https://github.com/atsamd-rs/atsamd/tree/master/hal/src/sercom/i2c

@sajattack
Copy link
Member

We also have a chatroom where we can discuss if you have more questions https://matrix.to/#/#atsamd-rs:matrix.org

tgross35 added a commit to tgross35/atsamd that referenced this issue Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants