-
Notifications
You must be signed in to change notification settings - Fork 7.7k
added support for enabling I2C HAL locks even when system wide HAL locks are disabled #11941
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
Conversation
CLAassistant
commented
Oct 23, 2025
CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
👋 Hello AlmirKadric, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Test Results
76 files 76 suites 16m 43s ⏱️
38 tests 38 ✅ 0 💤 0 ❌
241 runs 241 ✅ 0 💤 0 ❌
Results for commit efdf2bf.
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Why are changes in kconfig and CmakeList.txt? This changes how the Arduino libs are compiled!
This can introduce breaking changes.
Why are changes in kconfig and CmakeList.txt? This changes how the Arduino libs are compiled! This can introduce breaking changes.
@Jason2866 because its needed to make the option configurable. Also it will not break anything as it is completely optional just like the existing system wide HAL lock disable flag.
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.
this is irrelevant change that warrants its own PR with explanation
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.
sorry i recently push up some other fixes to this branch by accident, will rebase it
and put those in a separate PR
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.
this is irrelevant change that warrants its own PR with explanation
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.
sorry i recently push up some other fixes to this branch by accident, will rebase it
and put those in a separate PR
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.
This needs to depend on hal locks being off
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.
This should be defined in esp32-hal-i2c.h and propagate here and all relevant files (esp32-hal-i2c.c, Wire.h and Wire.cpp)
@AlmirKadric you need to sign the CLA for this to go further
By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes
Checklist
This entire section above can be deleted if all items are checked.
Description of Change
I had a use case where I want to disable HAL locks for UART and SPI busses (self-managed for performance reasons), but needed them for I2C. So implemented a way to override the behaviour for I2C (we should create something similar for other HAL lock categories as well, I'll open other PRs for this when I have the time).
Test Scenarios
Tested on ESP32S3 with arduino-esp32 v3.3.2 with multiple sensors connected over I2C and
CONFIG_DISABLE_HAL_LOCKS=y, withoutCONFIG_FORCE_I2C_HAL_LOCKS=yI get bad data over from I2C sensors. However withCONFIG_FORCE_I2C_HAL_LOCKS=ythis issue is resolved.Related links
Please provide links to related issue, PRs etc.