Skip to content

[Bug] bsp/gd32/arm/libraries/gd32_drivers/drv_pwm.c 开启BSP_USING_PWM 编译报错 #11331

@illustriousness

Description

@illustriousness

RT-Thread Version

5.2.1

Hardware Type/Architectures

GD32F303ZK

Develop Toolchain

GCC

Describe the bug

static rt_err_t drv_pwm_enable(struct gd32_pwm *pwm, const struct rt_pwm_configuration *configuration,
                               rt_bool_t enable)
{
    if(channel_num == 0)
    {
        LOG_E("GD32 PWM channel starts from 1!\n");
        return -RT_EINVAL;
    }

channel_num 未定义

Other additional context

另外可以考虑pwm的驱动将定时器和引脚配置相分离 用户自己去实现pwm的输出引脚配置 以获得对更多型号的支持

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions