我用的是M3的板子,在写程序时用到触摸液晶和串口,触摸液晶和串口都用了中断,串口没连接时,液晶都能出没的,串口连接了液晶就不能触摸了,求大神帮忙!!不知道是不是因为优先级的原因,是不是关掉串口就可以恢复液晶了。
void NVIC_Configuration(void)
{
NVIC_InitTypeDef NVIC_InitStructure;
/* Configure the NVIC Preemption Priority Bits */
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0);
/* Enable the USARTy Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
} |