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.
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.
[best_practices/最佳实践]: The added dependency select statement correctly resolves the compilation issue. This follows RT-Thread best practices for BSP Kconfig dependencies.
English: The addition of
select RT_USING_I2Cproperly ensures that when hardware I2C is enabled at the BSP level, the corresponding RT-Thread I2C device driver framework is automatically enabled. This prevents the compilation errors and follows the correct dependency pattern.中文:添加
select RT_USING_I2C正确地确保了当在 BSP 层启用硬件 I2C 时,相应的 RT-Thread I2C 设备驱动框架会自动启用。这可以防止编译错误并遵循正确的依赖模式。