< CAN0 RX1 interrupts */ CAN0_EWMC_IRQn = 22, /*!< CAN0 EWMC interrupts */ EXTI5_9_IRQn = 23, /*!< EXTI[9:5] interrupts */TIMER0_BRK_IRQn = 24, /*!< TIMER0 break interrupts */ TIMER0_UP_IRQn = 25, /*!< TIMER0 update interrupts */ TIMER0_TRG_CMT_IRQn = 26, /...
NonMaskableInt_IRQn = -14, /*!< 2 non maskable interrupt */ MemoryManagement_IRQn = -12, /...
EXTI5_9_IRQn =23,/*!< EXTI[9:5] interrupts */ TIMER0_BRK_IRQn =24,/*!< TIMER0 break interrupts */ TIMER0_UP_IRQn =25,/*!< TIMER0 update interrupts */ TIMER0_TRG_CMT_IRQn =26,/*!< TIMER0 trigger and commutation interrupts */ TIMER0_Channel_IRQn =27,/*!< TIMER0 channel ...
nvic_irq_enable(EXTI4_IRQn, 2U, 0U); //电压 nvic_irq_enable(EXTI5_9_IRQn, 1U, 0U); //电流 } /外部中断0响应函数 读取电压/ void EXTI5_9_IRQHandler(void) { if (RESET != exti_interrupt_flag_get(VOL_EXTI_LINE)) { nvic_irq_disable(EXTI5_9_IRQn);//关掉电流表中断 exti_interrup...
第一句,因为我这里用的是D6脚所以这里的中断号选择EXTI5_9_IRQn,后面参数参考上面的代码选择就可以了 第二句,这里需要配置为你所需要配置的外部中断引脚(我这里是D6脚) 第三句,因为我这里是D6脚,由上面那个表可知我们需要选择6号中断线即EXTI_6 第四句,清EXTI_6的中断标志位 4. 中断处理函数 void EXTI5...
//开启时钟 rcu_periph_clock_enable(RCU_SYSCFG); rcu_periph_clock_enable(RCU_GPIOA); //初始化GPIO口 gpio_mode_set(GPIOA,GPIO_MODE_INPUT,GPIO_PUPD_NONE,GPIO_PIN_8); /* enable and set EXTI interrupt to the lowest priority */ nvic_irq_enable(EXTI5_9_IRQn,2U,0U); /* connect EXTI...
< CAN0 RX1 interrupts */ CAN0_EWMC_IRQn = 22, /*!< CAN0 EWMC interrupts */ EXTI5_9_IRQn = 23, /*!< EXTI[9:5] interrupts */ TIMER0_BRK_IRQn = 24, /*!< TIMER0 break interrupts */ TIMER0_UP_IRQn = 25, /*!< TIMER0 update interrupts */ TIMER0_TRG_CMT_IRQn = 26, ...
CAN0_EWMC_IRQn=22,/*!< CAN0 EWMC interrupts */...\..\Firmware\CMSIS\GD\GD32F10x\Include\gd32f10x.h(260):error:#101:"EXTI5_9_IRQn"has already been declared in the current scope EXTI5_9_IRQn=23,/*!< EXTI[9:5] interrupts */..\..\Firmware\CMSIS\GD\GD32F10x\Include\gd32...
CAN0_EWMC_IRQn = 22, /*!< CAN0 EWMC interrupts */ EXTI5_9_IRQn = 23, /*!< EXTI[9:5] interrupts */ TIMER0_BRK_IRQn = 24, /*!< TIMER0 break interrupts */ TIMER0_UP_IRQn = 25, /*!< TIMER0 update interrupts */ TIMER0_TRG_CMT_IRQn = 26, /*!< TIMER0 trigger and c...
EXTI5_9_IRQHandler EXTI10_15_IRQHandler 从这里也可以看出,PX5-PX9,对应一个中断函数,PX10-PX15,对应一个中断函数,需要在中断函数中判断,具体是哪个中断源。 5、代码实现 代码语言:javascript 复制 staticuint8_t KeyState=0;voidKeyInit(void){rcu_periph_clock_enable(RCU_GPIOA);gpio_mode_set(GPIOA,...