-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conditional compilation for second I2C interface based on SOC_I2C…
…_NUM (#10408) The ESP32, ESP32-S and ESP32-H series have two I2C interfaces, while the ESP32-C series has only one.
- Loading branch information
Showing
2 changed files
with
4 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5d873c0
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.
@sivar2311 @me-no-dev This merge from branch master needs to be changed to
SOC_HP_I2C_NUM
5d873c0
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.
@Jason2866 Thanks!
But why is
SOC_HP_I2C_NUM
correct andSOC_I2C_NUM
is not?Unfortunately their meaning is neither mentioned in the documentation nor in the source code.
5d873c0
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.
SOC_HP_I2C_NUM is the number of I2C controllers in the digital domain. SOC_I2C_NUM is the total number of I2C controllers, including the ones in LP domain. In recent IDF versions, LP I2C controllers can be also accessed using the same I2C master driver as the ones in the digital domain.
See ESP32-C6 soc_caps for an example: https://github.com/espressif/esp-idf/blob/6e5a178b3120dced7fa5c29c655cc22ea182df3d/components/soc/esp32c6/include/soc/soc_caps.h#L240-L241
5d873c0
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 for your eagle eyes @Jason2866 and for clearification @igrr !
I created a new PR #10453