Skip to content
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] Add support for multiple I2C interfaces #5235

Open
wants to merge 11 commits into
base: mega
Choose a base branch
from

Conversation

tonhuisman
Copy link
Contributor

@tonhuisman tonhuisman commented Jan 29, 2025

Resolves: #4592

Features:

  • Add support for multiple I2C interfaces (ESP32 only!), default 2, max. 3.
    • Uses software-multiplexing, to avoid having to change (and test!) many libraries and plugins.
    • Explicitly disabled for ESP8266.
  • Also enables to have an optional I2C multiplexer per I2C interface.
  • Per directly addressed I2C hardware (External Time Source, WatchDog hardware, PCF/MCP addressing without task like monitor command) an I2C Interface selector is available.

TODO:

  • Reset default I2C settings on upgrade
  • Testing
  • Documentation updates

src/_P166_GP8403.ino Outdated Show resolved Hide resolved
@uzi18
Copy link
Contributor

uzi18 commented Jan 30, 2025

@tonhuisman @TD-er In fact for esp8266 i2c is software based so it could be also enabled via compatible soft library implementation.

@tonhuisman
Copy link
Contributor Author

tonhuisman commented Jan 30, 2025

@tonhuisman @TD-er In fact for esp8266 i2c is software based so it could be also enabled via compatible soft library implementation.

Yes, I know, but we have decided some time ago that for ESP8266 we are feature-complete, and want/need to motivate users to switch to ESP32 based boards.
This feature is mostly implemented to support the newer generation ESP32 models (S3, C5, C6, P4) with multiple I2C interfaces, on boards that actually have I2C hardware available at different GPIO pin pairs, like the LilyGO T-Beam S3. (That board even has dual SPI busses implemented, so another challenge to address 😅)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Additionals I²C bus (Master)
3 participants