extern int y;
int y=0;
void DEBUG_USART1_IRQHandler(void)
{
uint8_t z[8];
uint8_t i;
i=y;
if(USART_GetITStatus(USART1,USART_IT_RXNE) ==SET)
{
z=USART_ReceiveData(DEBUG_USART1);
y++;
if(i==7)
{
Usart_SendArray(DEBUG_USART1,z,8);
Usart_SendArray(DEBUG_USART2,z,8);
y=0;
}
}
}
为什么我通过串口调试助手发送的一串数组,在这个中断里面数组还会变呀?file:///C:\Users\19632\AppData\Roaming\Tencent\Users\1963271269\QQ\WinTemp\RichOle\8RLX}I{IT7C`D7S2A4V24%S.png
file:///C:\Users\19632\AppData\Roaming\Tencent\Users\1963271269\QQ\WinTemp\RichOle\8RLX}I{IT7C`D7S2A4V24%S.png |