-
Notifications
You must be signed in to change notification settings - Fork 2k
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
samd21/i2c: add feedback in case transfer failed #3751
Conversation
I definitely agree with PR, this is great that you had a look at it! I don't see any errors here.
And then
-4 will never be handled by the device driver. So I don't know if it is really useful to return different value for different errors. What's your opinion? |
The Riot I2C interface doesn't provide detailed feedback in case of failure, but internally the driver has some knowledge about the failure. It was just that you could use this information maybe somewhere, but then it turned out that it's not the case. I don't have an opinion on this as long as the I2C interface doesn't provide more detailed feedback. |
Ok so we should merge your PR and someone might want to edit the I2C driver and use those feedback values. |
Ok great! Let's wait for Travis and merge |
@OlegHahm, may I merge this PR even if it's not for the release? It's a very small add. |
If I may put my two cents in, I'd say only bug fixes and discussed features should be included in the coming release. Looking at the number of PRs and issues that are still open and tagged for this release.. it is strangely growing |
I agree with @cgundogan. Even if it's only a small patch, we have to cut the line somewhere. Hopefully, we will have the release by the end of next week. |
Ok, will wait the release then |
Related: |
@bapclenet, feature freeze is over. We should find out why the build test fails for M0 group and merge the PR then. |
Doesn't fail anymore. Maybe some travis issue some time ago? |
Ah nice. Well, as @bapclenet already ACKed I'm gonna hit the button now |
samd21/i2c: add feedback in case transfer failed
Thanks, @PeterKietzmann :-) |
According to the I2C interface the return value of any read or write function is either 'the bytes transfered' or
-1
in case of undefined device.With this PR those functions now return
0
in case of general failure, so the user/driver code can react accordingly.