- Notifications
You must be signed in to change notification settings - Fork1k
I2C slave: allow function wrapped callbacks#1835
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
c528a21
to774cbac
CompareMaybe related to#1617 |
@fpistm I was thinking the same, I've used the Today I'll do more tests. |
Yes it is probably the case but requires to be be tested 😉 |
hitech95 commentedSep 28, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I've tested with a STM32G030C8T and a NUCLEO F401 and both works. |
So you have tested with the c declaration removed ? if it works could you update the PR. |
Not yet, I'm gonna do it tomorrow. |
Hi@hitech95 |
Hi |
No worry. I understand perfectly 😉 |
774cbac
to4aea869
CompareSigned-off-by: hitech95 <nicveronese@gmail.com>
4aea869
to8e1da5c
CompareI've tested with the So I'm pushing a simplified patch for that. Tested on Nucleo STM32 F401RE |
fpistm left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
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.
LGTM.
Tested on several series.
Thank you@hitech95
Uh oh!
There was an error while loading.Please reload this page.
Summary
This PR fixes/implements the followingbugs/features
This allow to have TwoWire callbacks methods inside classes. You can use std::bind to wrap the callback functions.
This is an example of a Class that completely handle the I2C comunication without having the user to manually implement the callbacks:
Validation
Code formatting
Closing issues
Closes#1833