-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Fix lazy init and prevent un-necessary calls to NativeInit #981
Conversation
…ith 'X' Signed-off-by: Matthias Jentsch <[email protected]>
Part of changes made to the I2C managed library resulting in stub changes
Changes resulting due to I2C library changes. I'm not too sure how version and checksum are getting updated. Updated just the checksum as generated on my build machine. Please double-check and educate me on this aspect
Hi @sharmavishnu, I'm nanoFramework bot. A human will be reviewing it shortly. 😉 |
@sharmavishnu could you please rebase your branch on "upstream/develop" so this PR isn't showing all these unrelated commits? Remember to pull the changes first as I've just updated it with the latest changes from develop. |
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.
Almost forgot: please update the I2c assembly declaration on the FreeRTOS\ESP32 target.
NativeInit method was getting called everytime I2cDevice.FromId method was called. This resulted in I2C sub-system initialization every time a new I2C device started using a bus. Fixed to ensure that bus is initialized only the first time
|
@sharmavishnu you are submitting the PR from your develop branch. That causes all sorts of issues when updating from upstream. Basically:
|
I'm opening a branch for this PR to fix the commits and remove the changes.txt file and merge from there. |
Stub changes due to change in I2C core library
Description
Everytime "I2cDevice.FromId" method is called, the "NativeInit" method gets called. This method should be called only once per I2C bus. This fix ensures that NativeInit is called only when a new I2C bus is used in managed code
Motivation and Context
How Has This Been Tested?
Tested with HTU21D I2C sensor. So far have been able to debug multiple times with no I2C hang.
Screenshots
Types of changes
Checklist:
Signed-off-by: @sharmavishnu