rt-thread icon indicating copy to clipboard operation
rt-thread copied to clipboard

APM32 GPIO驱动 drv_gpio.c 中对外部中断的配置有缺失

Open lizdDong opened this issue 3 years ago • 2 comments

lizdDong avatar Nov 27 '22 08:11 lizdDong

_pin_irq_enable函数中,没有对 EINT Line的配置,即没有形如以下内容配置:

            /* Connect Button EINT Line to Button GPIO Pin */
            GPIO_ConfigEINTLine(GPIO_PORT_SOURCE_B, GPIO_PIN_SOURCE_1);

            /* Configure Button EINT line */
            EINT_configStruct.line = EINT_LINE_1;
            EINT_configStruct.mode = EINT_MODE_INTERRUPT;
            EINT_configStruct.trigger = EINT_TRIGGER_FALLING;
            EINT_configStruct.lineCmd = ENABLE;
            EINT_Config(&EINT_configStruct);

导致无法触发中断。

lizdDong avatar Nov 27 '22 08:11 lizdDong

欢迎提交PR

mysterywolf avatar Dec 02 '22 01:12 mysterywolf