Skip to content

drivers/isl29020: apply unified params definition scheme#8688

Merged
aabadie merged 4 commits intoRIOT-OS:new_i2c_iffrom
aabadie:pr/drivers/params/isl29020
Jul 5, 2018
Merged

drivers/isl29020: apply unified params definition scheme#8688
aabadie merged 4 commits intoRIOT-OS:new_i2c_iffrom
aabadie:pr/drivers/params/isl29020

Conversation

@aabadie
Copy link
Copy Markdown
Contributor

@aabadie aabadie commented Feb 28, 2018

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

@aabadie aabadie added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation Area: drivers Area: Device drivers CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 28, 2018
@aabadie aabadie added the Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. label Mar 20, 2018
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Apr 11, 2018

Just tested on iotlab-m3, works

@aabadie aabadie changed the base branch from master to new_i2c_if May 27, 2018 21:10
@aabadie aabadie added TF: I2C Marks issues and PRs related to the work of the I²C rework task force and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 27, 2018
@aabadie aabadie force-pushed the pr/drivers/params/isl29020 branch from b34c64d to 538bbfc Compare May 27, 2018 21:12
}
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);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess there is some wrong copy&paste here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

{
for (unsigned int i = 0; i < ISL29020_NUM; i++) {
const isl29020_params_t *p = &isl29020_params[i];
assert(ISL29020_NUM == ISL29020_INFO_NUM);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering why you used == and not >= ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@aabadie aabadie force-pushed the pr/drivers/params/isl29020 branch from 538bbfc to 3ecd99a Compare May 28, 2018 19:55
@aabadie aabadie force-pushed the pr/drivers/params/isl29020 branch 2 times, most recently from 24bb33d to c684efd Compare June 7, 2018 21:26
@aabadie aabadie force-pushed the pr/drivers/params/isl29020 branch from c684efd to ebaa808 Compare June 18, 2018 11:33
Copy link
Copy Markdown
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untested ACK; code changes to new API look okay.

@aabadie aabadie force-pushed the pr/drivers/params/isl29020 branch from ebaa808 to 540bff7 Compare July 5, 2018 16:18
@aabadie aabadie merged commit 452f847 into RIOT-OS:new_i2c_if Jul 5, 2018
@kYc0o
Copy link
Copy Markdown
Contributor

kYc0o commented Jul 9, 2018

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
@aabadie aabadie deleted the pr/drivers/params/isl29020 branch September 23, 2018 08:47
@aabadie aabadie added this to the Release 2018.10 milestone Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. TF: I2C Marks issues and PRs related to the work of the I²C rework task force Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants