void USART1_IRQHandler(void)
{
//uint8_t ch;
USART_ClearITPendingBit(USART1,USART_IT_RXNE);
if(USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
{
//ch = USART1->DR;
chi= USART_ReceiveData(USART1);//将信号存入数组,上限是1-8.共8个
// printf("%c", ch[id]);
i++;
if(i=='9')
i='1';
// printf( "%c", ch ); //将接受到的数据直接返回打印
}
} |