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

[feature request] expose timeout feature in I2C API #196

Open
japaric opened this issue Feb 9, 2021 · 1 comment
Open

[feature request] expose timeout feature in I2C API #196

japaric opened this issue Feb 9, 2021 · 1 comment

Comments

@japaric
Copy link

japaric commented Feb 9, 2021

the STM32L433's (at least) I2C peripheral has a TIMEOUTR register to configure a (bus busy?) timeout.
it would be nice to have this supported in the I2C API
I guess the constructor could take a timeout value and then operations like read, write, etc. would return an Error::Timeout if the I2C device takes too long to error (or when there's no I2C device attached to the bus) -- the current behavior is that they block forever.

@korken89
Copy link
Collaborator

Hi, a PR for this would be welcome!

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