static void NVIC_Configuration(void)
{
NVIC_InitTypeDef NVIC_InitStructure;
//config one bit for preemption priority
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
//Config the interup source
NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn |EXTI15_10_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
大牛指导一下? |