void TestVin()
{
uchar p2=P2;
ByteSignal SINGAL_IO ;
if(!LastError)
{
SINGAL_IO.BYTE=SINGAL_IN_ADR;
if(SINGAL_IO.SI.VinH==0)
{
#ifdef TESTVIN
LastError=ERR_VIN;
// Delay_ms(5);
SendError();
#endif
}
}
P2=p2;
}
/***************************************************************************************/
void SendCMD(uchar Command)
{
uchar DATA[MAX_CMD_BUF];
uchar i = 0, j = 0;
//Char4Float uTemp;
if(BuildCMDArr[Command] != 0)
{
i= BuildCMDArr[Command](DATA+2);
}
DATA[0] = Command;
DATA[1] = i;
i += 2;
DATA[i++] = CMD_END;
for(j=0;j<i;j++)
{
TB8 = 1;
if ((j == 0) || (j == (i - 1)))
{
SBUF=DATA[j]+129;
while(TI == 0);
TI = 0;
}
else
{
SBUF=DATA[j]>127?127:DATA[j];
while(TI == 0);
TI = 0;
SBUF=DATA[j]>127?(DATA[j]-127):0;
while(TI == 0);
TI = 0;
}
}
}
其中#define SendError() SendCMD(CMD_SEND_ERROR_C2P);
丫的,这怎么就递归调用了呢?
|