static void NVIC_Configuration(void)
{
NVIC_InitTypeDef NVIC_InitStructure;
/*Configure one bit for preempting priority*/
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
/*Configure the interrupt source*/
NVIC_InitStructure.NVIC_IRQChannel = EXTI0_IRQn;
// 0是如何获得的
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
} |