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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recall this was updated not that long ago. Is a positive number really a failure?
This came from i2c HAL write that specifies the following:
How many targets do follow this new update? how does it map to the current one?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, there a two different methods/functions: one is
method
I2C::write(int, const char*, int, bool)
declared indrivers/I2C.h
,the other one is
function
i2c_write(i2c_t*, int, const char, int, int)
declared inhal/i2c_api.h
.Method
I2C::write(int, const char*, int, bool)
uses functioni2c_write(i2c_t*, int, const char, int, int)
to implement its functionality (see here, especially line #66).In particular note that the return value of method
I2C::write(int, const char*, int, bool)
is computed in this line ... and is different from the return value of functioni2c_write(i2c_t*, int, const char, int, int)
!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, that explains it