better default display i2c bus #10984
Merged
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.
User description
Uses the external (compass) i2c bus if UG2864_I2C_BUS isn't defined. Otherwise, the default i2c bus.
Rather than i2c1.
PR Type
Enhancement
Description
This description is generated by an AI tool. It may have inaccuracies
Improved default I2C bus selection for UG2864 OLED display
Uses magnetometer I2C bus when available, falls back to default I2C bus
Replaces hardcoded BUS_I2C1 with more flexible bus selection logic
Diagram Walkthrough
File Walkthrough
common_hardware.c
Enhanced I2C bus selection logicsrc/main/target/common_hardware.c
BUS_I2C1with conditional logicMAG_I2C_BUS→DEFAULT_I2C_BUS