-
Notifications
You must be signed in to change notification settings - Fork 5.3k
fix\rsoc: fix gd32f5xx adc driver problem #10826
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
Conversation
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
SOC_SERIES_GD32F5xx和SOC_SERIES_GD32F4xx系列的API应该是相同的,适配情况可以参考 #10737 ,然后主仓尽量保持最小化,adc就不要使能了。 |
# CONFIG_RT_USING_PHY is not set | ||
# CONFIG_RT_USING_PHY_V2 is not set | ||
# CONFIG_RT_USING_ADC is not set | ||
CONFIG_RT_USING_ADC=y |
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.
默认建议不用开,如果需要验证,可以加.ciattachconfig 文件
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.
拉取/合并请求描述:(PR description)
[修复gd32f527的bsp中的adc适配问题。具体来说,修复了drv_adc.c文件中的API老旧以及不匹配问题。参考GD32F5xx系列的库文件,将老旧的API替换为新的API,并修正了宏定义配置。
为什么提交这份PR
在GD32F527的BSP中,ADC驱动的API与当前GD32F5xx系列的库文件不匹配,导致ADC无法正常工作。
你的解决方案是什么
参考GD32F5xx系列的库文件,更新了ADC驱动的API,使其与最新的库文件保持一致。同时,修正了相关的宏定义配置,并删除了不必要的代码。
请提供验证的bsp和config
测试情况
已在GD32F527I-EVAL开发板上测试ADC功能,工作正常。
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up