drivers/isl29020: apply unified params definition scheme#8688
Merged
aabadie merged 4 commits intoRIOT-OS:new_i2c_iffrom Jul 5, 2018
Merged
drivers/isl29020: apply unified params definition scheme#8688aabadie merged 4 commits intoRIOT-OS:new_i2c_iffrom
aabadie merged 4 commits intoRIOT-OS:new_i2c_iffrom
Conversation
Contributor
Author
|
Just tested on iotlab-m3, works |
47 tasks
b34c64d to
538bbfc
Compare
dylad
reviewed
May 28, 2018
drivers/isl29020/isl29020.c
Outdated
| } | ||
| res = (high << 8) | low; | ||
| DEBUG("ISL29020: Raw value: %i - high: %i, low: %i\n", res, high, low); | ||
| DEBUG("ISL29020: Raw value: %i - high: %i, low: %i\n", res, high, low, 0); |
Member
There was a problem hiding this comment.
I guess there is some wrong copy&paste here
dylad
reviewed
May 28, 2018
| { | ||
| for (unsigned int i = 0; i < ISL29020_NUM; i++) { | ||
| const isl29020_params_t *p = &isl29020_params[i]; | ||
| assert(ISL29020_NUM == ISL29020_INFO_NUM); |
Member
There was a problem hiding this comment.
Just wondering why you used == and not >= ?
Contributor
Author
There was a problem hiding this comment.
Because the loop below is accessing 2 different lists, one for the list of device descriptor and one for list device information: each list length must match.
538bbfc to
3ecd99a
Compare
24bb33d to
c684efd
Compare
c684efd to
ebaa808
Compare
smlng
approved these changes
Jul 4, 2018
Member
smlng
left a comment
There was a problem hiding this comment.
untested ACK; code changes to new API look okay.
ebaa808 to
540bff7
Compare
Contributor
|
Please don't forget to advertise the API change on the driver usage. |
basilfx
pushed a commit
to basilfx/RIOT
that referenced
this pull request
Jul 10, 2018
drivers/isl29020: apply unified params definition scheme
dylad
pushed a commit
to dylad/RIOT
that referenced
this pull request
Jul 10, 2018
drivers/isl29020: apply unified params definition scheme
dylad
pushed a commit
that referenced
this pull request
Jul 11, 2018
drivers/isl29020: apply unified params definition scheme
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 cleans up the isl29020 implementation to make more inline with other drivers.
Issues/PRs references
Initially done in #7937 and related to #7519
#6577