-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i2c_master: improve documentation #17896
Conversation
7b15955
to
44c04e8
Compare
This change is not really useful — it just increases the confusion, because the The AVR
It also provides the high-level I2C API on top of that low-level API:
However, the ChibiOS I2C API does not provide any equivalent to the low-level I2C API — it provides only functions like Unfortunately, somebody thought that it would be good to expose the As for porting your keyboard, what you actually need to do is rewrite the code to use the high-level I2C API instead of the AVR-only low-level API — then your code should work on both AVR and ChibiOS. Any calls to |
thanks for the detailed feedback - wasn't aware of that kind of code legacy...
good idea! i'll do that btw: from what i saw - going through the code and "adjusting" the few i2c_start(add_only) calls: there aren't that many users of the chibios version... so the "wrong-ish" chibios:i2c_start could be dropped relatively easily - thoughts on that? also: revising the documentation to recommend/push users to stay with the higher level i2c-api instead of i2c_star/_stop? |
regarding documentation: how about something like this: e6ff49e ? |
Thank you for your contribution! |
Signed-off-by: Johannes Schneider <[email protected]>
e6ff49e
to
3a9b1d9
Compare
Co-authored-by: Ryan <[email protected]>
Thank you for your contribution! |
Thank you for your contribution! |
while working on a new incarnation of an existing avr-keyboard, with now a chibios-based MCU i ran into compile-time issues for a driver that relies on the platform specific i2c_master implementation
it turned out that a "misaligned" signature in the chibios variant was the culprit...
these two patches re-align the "i2c_start" method with the documentation and the current avr implementation, by adding a "timeout" parameter
this PR possibly contributes a little to #8297
Description
Types of Changes
Issues Fixed or Closed by This PR
Checklist