drivers/lsm6dsl: adapt the i2c api return codes#9299
Merged
aabadie merged 1 commit intoRIOT-OS:new_i2c_iffrom Jun 28, 2018
Merged
drivers/lsm6dsl: adapt the i2c api return codes#9299aabadie merged 1 commit intoRIOT-OS:new_i2c_iffrom
aabadie merged 1 commit intoRIOT-OS:new_i2c_iffrom
Conversation
47 tasks
This was referenced Jun 6, 2018
dylad
reviewed
Jun 7, 2018
Member
dylad
left a comment
There was a problem hiding this comment.
I'm wondering if we should change the behaviour of the driver.
Right now, the res variable in most functions is increment (res +=) at each I2C API call but now we don't return the number of bytes I think this should be dropped.
What do you think ?
Contributor
Author
Each function is supposed to return 0 on success, so after adding all return codes, the result must be 0. If one of the function a negative error code, then the final result is negative as well, meaning there's an issue. |
smlng
approved these changes
Jun 28, 2018
basilfx
pushed a commit
to basilfx/RIOT
that referenced
this pull request
Jul 10, 2018
drivers/lsm6dsl: adapt the i2c api return codes
dylad
pushed a commit
to dylad/RIOT
that referenced
this pull request
Jul 10, 2018
drivers/lsm6dsl: adapt the i2c api return codes
dylad
pushed a commit
that referenced
this pull request
Jul 11, 2018
drivers/lsm6dsl: adapt the i2c api return codes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
This PR readapts the lsm6dsl driver to the I2C return codes (< 0 in case of an error, 0 on success).
Issues/PRs references
Follow-up of #9193 and related to #6577