Skip to content
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

compile error: incompatible function pointer types initializing #10186

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Lin-Chengqiu
Copy link
Contributor

No description provided.

@github-actions github-actions bot added BSP BSP: GD32 BSP related with GD32 labels Apr 12, 2025
@supperthomas supperthomas requested a review from Copilot April 13, 2025 08:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

bsp/gd32/arm/libraries/gd32_drivers/drv_adc.c:108

  • Changing the channel parameter to rt_int8_t appears to resolve the function pointer type incompatibility; ensure that any logic relying on channel values correctly handles the signed type.
static rt_err_t gd32_adc_enabled(struct rt_adc_device *device, rt_int8_t channel, rt_bool_t enabled)

bsp/gd32/arm/libraries/gd32_drivers/drv_adc.c:156

  • Updating the channel parameter to rt_int8_t resolves the type compatibility issue; verify that all channel operations are consistent with the signed parameter across the ADC driver implementation.
static rt_err_t gd32_adc_convert(struct rt_adc_device *device, rt_int8_t channel, rt_uint32_t *value)

@supperthomas
Copy link
Member

请rebase一下,并且加上yml文件,应该很简单。menuconfig 按d保存,然后把配置保存到yml中,参考文档中描述

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BSP: GD32 BSP related with GD32 BSP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants