Study_Stellaris 发表于 2014-11-12 13:24
把
GPIO_EXTILineConfig(GPIO_PortSourceGPIOC, GPIO_PinSource13);
添加到
加了,还是不行
GPIO_Init(GPIOC, &GPIO_InitStructure);
GPIO_EXTILineConfig(GPIO_PortSourceGPIOC, GPIO_PinSource13);
/*EXTI LINE MODE CONFIG*/
EXTI_InitStructure.EXTI_Line = EXTI_Line13;
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; //中断模式为中断模式
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling; //下降沿出发
EXTI_InitStructure.EXTI_LineCmd = ENABLE; //使能中断线
EXTI_Init(&EXTI_InitStructure); //根据参数初始化中断寄存器
}