ht66fu50串口接收后会一直发送
if(_xpf)
{
_xpf=0;
_mf2f=0;
Register.usr = UARTBridgeSPI(ReadUSR,0);
if(Register.Flag.rxif==1&Register.Flag.ridle==1)
{
ReceData[n] = UARTBridgeSPI(ReadFIFO,0x01);
_delay(100);
n++;
}
if(Register.Flag.txif==1)
{
UARTBridgeSPI(WriteFIFO,ReceData[0]);
_delay(100);
j++;
}
if(j>19)
{j=0x00;n=0;_nop();}//}break}
_xpf=0;
_mf2f=0;
} |
我觉得官网上的代码有问题