[fix][gd32/drivers][rsoc]: add support for adc of the gd32f5 series#10834
Merged
Rbb666 merged 1 commit intoRT-Thread:masterfrom Oct 27, 2025
Merged
[fix][gd32/drivers][rsoc]: add support for adc of the gd32f5 series#10834Rbb666 merged 1 commit intoRT-Thread:masterfrom
Rbb666 merged 1 commit intoRT-Thread:masterfrom
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
kurisaW
approved these changes
Oct 21, 2025
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.
说明: 修复gd32f527的bsp中的adc适配问题。具体来说,修复了drv_adc.c文件中的API老旧以及不匹配问题。参考GD32F5xx系列的库文件,将老旧的API替换为新的API,并修正了宏定义配置。
为什么提交这份公关
在GD32F527的BSP中,ADC驱动的API与当前GD32F5xx系列的库文件不匹配,导致ADC无法正常工作。
你的解决方案是什么
参考GD32F5xx系列的库文件,更新了ADC驱动的API,使其与最新的库文件保持一致,同时,修正了相关的宏定义配置,并删除了不必要的代码。
请提供验证的bsp和配置
BSP: bsp/gd32/arm/gd32527I-eval
。配置: 使用默认配置,但使能了ADC驱动(如CONFIG_BSP_USING_ADC)
action: 由于是个人仓库的PR,暂时无法提供rt-thread官方仓库的操作链接。但已在本地成功编译并通过基本测试。
测试情况
已在GD32F527I-EVAL开发板上测试ADC功能,工作正常。
]
当前拉取/合并请求的状态您的公关意图
必须选择一项选择一个 (必填):
本拉取/合并请求是一个草稿版本此PR用于代码审查,旨在获得反馈
本拉取/合并请求是一个成熟版本此PR已成熟,并准备集成到repo中
代码质量代码质量:
我在这个拉取/合并请求中已经考虑了作为此请求的一部分,我考虑了以下内容:
已经仔细查看过代码改动的对比已经检查了PR和旧代码之间的区别
代码风格正确,包括缩进空格,命名及其他风格风格指南,包括间距,命名和其他风格
没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码删除和清理所有冗余代码
所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP,所有修改都是合理的,不会影响其他组件或BSP
对难懂代码均提供对应的注释我已经适当地评论了代码是棘手的
此PR中的代码是高质量的代码质量很高
已经使用格式化等源码格式化工具确保格式符合RT-线程代码规范本PR符合RT-线程代码规范
如果是新增bsp,已经添加ci检查到。github/ALL_BSP_COMPILE.json 详细请参考链接BSP自查