void uartTest(U32 *cmd)
{
U32 state_rcv=0,state_send=0,i,time_out;
U8 UartSendBuff[1024],UartRecvBuff[1024];
U32 first_data,step,Lenth,test_result=0,tmp=0;
U32 Uart_FiFO=0,time_out_flag=0,recv_lenth=0;
first_data=cmd[1];
step=cmd[2];
Lenth=(cmd[3]<<8)+cmd[4];
if(cmd[5]==0x11)//time_out EN:0x11
{
time_out=50000;
time_out_flag=0x11;
}
else
{
time_out=0;
time_out_flag=0x22;
}
for(i=0;i<1024;i++)
{
UartRecvBuff[i]=0;
UartSendBuff[i]=0;
}
if((cmd[0]==0)||(cmd[0]==7)||(cmd[0]==8))
{
if(Lenth>1024)
{
Uart_FiFO=1024;
}
else Uart_FiFO=Lenth;
}
else
{
if(Lenth>256)
{
Uart_FiFO=256;
}
else Uart_FiFO=Lenth;
}