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

Complete the twi/i2c hal #25

Open
jnaulet opened this issue Apr 29, 2023 · 0 comments
Open

Complete the twi/i2c hal #25

jnaulet opened this issue Apr 29, 2023 · 0 comments
Labels
architecture Structural change enhancement New feature or request

Comments

@jnaulet
Copy link
Owner

jnaulet commented Apr 29, 2023

As i2c is probably my least favorite peripheral to develop and test, a lot has been left out.

It requires at least one more interface in the form of twi_poll() for the slave part.

A simple not twi_poll(struct twi *ctx) that returns -EAGAIN, 0 (write) or 1 (read) should do the trick.

This will allow a slave to know if he’s addressed for a read or a write, allowing asynchronous read and writes.

this is already present in different state machines so it’s just moving code around, the big part of the work will be to re-test everything.

Regarding the setup, 10bit mode is missing, unbalanced scl hi/Lo is not supported, etc, etc and most of the drivers simply ignore basic errors like arbitration loss.

jnaulet added a commit that referenced this issue Apr 29, 2023
jnaulet added a commit that referenced this issue Apr 30, 2023
@jnaulet jnaulet changed the title Complete the two/i2c hal Complete the twi/i2c hal Apr 30, 2023
@jnaulet jnaulet added the enhancement New feature or request label Apr 30, 2023
@jnaulet jnaulet added the architecture Structural change label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Structural change enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant