-
Notifications
You must be signed in to change notification settings - Fork 137
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
Safer i2c #125
base: master
Are you sure you want to change the base?
Safer i2c #125
Conversation
I added the readRaw function to allow multi-byte reads without sending a register number |
operation. Changed "try" variants to throw error rather than return optional.
I wish someone would get this fixed so it can be merged. It works fine on the official 64bit Raspberry OS. |
Please merge this necessary request. I've been using it for months without issue. The only problem I see is that here its called "Safer i2C" whereas curuva calls it "Safe-I2C". The failed details say "The log was not found. It may have been deleted based on retention settings". I think this means "don't worry about it". |
What's in this pull request?
Update I2C functions that don't abort when communication errors occur.
Is there something you want to discuss?
I have been working on a project using the Qwiic cables to communicate with a slave device. The problem is that the current functions cause the master application to abort whenever the slave goes into debug.
I modified the various write functions to return a discardable Bool result, and added variants of the read functions that return optional results. I left the current read functions that return actual values intact, so as not to break anyones existing code.
Pull Request Checklist