drivers/hts221: adapt to i2c api return codes#9298
drivers/hts221: adapt to i2c api return codes#9298aabadie merged 1 commit intoRIOT-OS:new_i2c_iffrom
Conversation
dylad
left a comment
There was a problem hiding this comment.
Overall changes are OK,
Could you share some debug output or do you know if someone can test this device so we can move forward ?
BTW, why acquire/release are used several times in the init function ? never saw this behaviour.
I looked at the code more in depth, and this is perfectly fine in term of workflow: it's just that some private functions are not acquiring the bus before performing their read/write operations.
|
Sure, but this is first time I saw this. Is there any gain from doing this ? I don't have strong opinion about this. If the driver was already in this state before, this is not our rights to change it with the I2C refactoring. |
I think @smlng has the hardware, since he initially wrote this driver. Maybe he can comment on your other questions. |
drivers/hts221: adapt to i2c api return codes
drivers/hts221: adapt to i2c api return codes
drivers/hts221: adapt to i2c api return codes
Contribution description
This PR readapts the hts221 driver to the I2C return codes (< 0 in case of an error, 0 on success).
Issues/PRs references
Follow-up of #9195 and related to #6577