void EXTI15_10_IRQHandler(void)
{
if(EXTI_GetITStatus(EXTI_Line15)!=RESET)
{
Flag=1
GPIO_SetBits(GPIOB,GPIO_Pin_13);
GPIO_SetBits(GPIOB,GPIO_Pin_12);
EXTI_ClearITPendingBit(EXTI_Line15);
}
}
NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; // 抢占优先级别1
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 1; //响应优先级别1
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);