Avoid the legacy driver/i2c.h include in M5GFX.cpp - #284
Merged
Merged
Conversation
Only i2c_port_t / I2C_NUM_x are needed here. ESP-IDF 6.x marks driver/i2c.h as EOL and emits a CRITICAL WARNING pragma on every include; the header is scheduled for removal in v7. Include driver/i2c_master.h when available (IDF 5.2+), fall back to driver/i2c.h for IDF 4.4 (Arduino core 2.x). Same pattern as common.cpp.
Merged
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
M5GFX.cppincludes the legacydriver/i2c.honly to geti2c_port_t/I2C_NUM_x.ESP-IDF 6.x marks that header as EOL and emits a
CRITICAL WARNINGpragma on every include; it is scheduled for removal in IDF v7.This change includes
driver/i2c_master.hwhen it is available (IDF 5.2+) and falls back todriver/i2c.hotherwise (IDF 4.4 / Arduino core 2.x), the same pattern already used inplatforms/esp32/common.cpp.No functional change.
Verified
driver/i2c.hEOL warning fromM5GFX.cppno longer appears, build passes