高级会员
- 积分
- 527
- 金钱
- 527
- 注册时间
- 2017-11-2
- 在线时间
- 122 小时
|
1金钱
stm32f030c8t6工程有個a文件,沒見到串口中斷,往工程中添加usart中斷后,編譯說重複定義,沒明白為什麼這樣?
void USART2_IRQHandler(void)
{
if(USART_GetFlagStatus(USART2, USART_FLAG_RXNE)!=RESET)
{
UartRxData[UartRxDatacount++]=(USART_ReceiveData(USART2));
if(UartRxDatacount>5)
{
UartRxDatacount =0;
USART_ITConfig(USART2, USART_IT_RXNE, DISABLE);
USART_ITConfig(USART2, USART_IT_TC, ENABLE);
}
}
GPIO_ResetBits(GPIOA, GPIO_Pin_9);
if(USART_GetFlagStatus(USART2, USART_FLAG_TC) != RESET)
{
USART_ClearFlag(USART2,USART_FLAG_TC);
// USART_SendData(USART2, TDR_Data[TDR_Datacount++]);
TDR_Data[TDR_Datacount++] =USART2->TDR;
if(TDR_Datacount>5)
{
TDR_Datacount = 0;
USART_ITConfig(USART2, USART_IT_TC, DISABLE);
USART_ITConfig(USART2, USART_IT_RXNE, ENABLE);
}
}
}
Error[Li006]: duplicate definitions for "USART2_IRQHandler"; in "C:\Users\rd175\Desktop\TL 100 V2.1.1113 with _15_01_013 APP V1.43\WLT2564J_EWIG_15_01_013\EWIG\
Projects\EWARM_Demo\IO_Toggle\Obj\main.o", and "HCITRANS.o(IAR_M0_EWIG.a)"
|
|