[mw_shl_code=c,true]main
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); /* 设置中断嵌套模式 */
SYSTICK_LEVEL = 3;
TIMER_LEVEL = 2;
EXIT0_LEVEL = 1;
while(1) {
int3 = 0; /* 让 systick isr 停下来 */
while(0 == int3);
}
systick_isr
if(0 == int3) {
while(0 == int2); /* 等待 timer isr 救援 */
}
timer_isr
if(0 == int2) {
while(0 == int1); /* 等待 exti0 isr 救援 */
}
exti0_isr
int1 = 1; /* 触发 timer isr 正常响应 */[/mw_shl_code]
一周热门 更多>