static void NVIC_Config(void)
{
NVIC_InitTypeDef NVIC_InitStruct;
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
NVIC_InitStruct.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStruct.NVIC_IRQChannel = EXTI1_IRQn;
NVIC_InitStruct.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStruct.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init( &NVIC_InitStruct );
NVIC_InitStruct.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStruct.NVIC_IRQChannel = EXTI3_IRQn;
NVIC_InitStruct.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStruct.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init( &NVIC_InitStruct );
}
谁能给我通俗的讲一下NVIC_InitStruct.NVIC_IRQChannelPreemptionPriority,NVIC_InitStruct.NVIC_IRQChannelSubPriority,
是什么意思,到底怎样设置中断优先级,还有中断优先组NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1); 组1是比组2先执行吗? |