| 
 
| 本帖最后由 zhong5411 于 2012-1-7 17:31 编辑 
 /*******************************************************************************
 * Function Name  : NVIC_Configuration
 * Description    : Configures Vector Table base location.
 * Input          : None
 * Output         : None
 * Return         : None
 *******************************************************************************/
 void NVIC_Configuration(void)
 {
 NVIC_InitTypeDef NVIC_InitStructure;
 /* 配置中断使用组合1*/
 NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
 /* Configure and enable USART3 interrupt*/
 NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQn;
 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
 NVIC_Init(&NVIC_InitStructure);
 
 /* Configure and enable UART4 interrupt */
 NVIC_InitStructure.NVIC_IRQChannel = UART4_IRQn;
 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
 NVIC_Init(&NVIC_InitStructure);
 /*Configure and enable UART5 interrupt */
 NVIC_InitStructure.NVIC_IRQChannel = UART5_IRQn;
 NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
 NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
 NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
 NVIC_Init(&NVIC_InitStructure);
 
 }
 
 
 错误现象是
 Build target 'Target 1'
 compiling ZQL_nvic.c...
 ..\src\ZQL_nvic.c(62): error:  #20: identifier "UART4_IRQn" is undefined
 ..\src\ZQL_nvic.c:      NVIC_InitStructure.NVIC_IRQChannel = UART4_IRQn;
 ..\src\ZQL_nvic.c:                                           ^
 ..\src\ZQL_nvic.c(69): error:  #20: identifier "UART5_IRQn" is undefined
 ..\src\ZQL_nvic.c:      NVIC_InitStructure.NVIC_IRQChannel = UART5_IRQn;
 ..\src\ZQL_nvic.c:                                           ^
 ..\src\ZQL_nvic.c: ..\src\ZQL_nvic.c: 0 warnings, 2 errors
 Target not created
 
 麻烦高手大虾帮忙解决一下
 | 
 |