Home > Back-end >  For bosses to solve, why this one no code
For bosses to solve, why this one no code

Time:10-27

Void the read ()//read a byte returned response signal
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
//reads a byte form the Sensibus and gives an aknowledge in case of "ack=1
"Unsigned char I, val=0;
Temp_ LL=0;
Temp_ _h=0;
DATA=https://bbs.csdn.net/topics/1;//release data bus
For (I=0 x80; i> 0; I/=2)//displacement eight
{SCK=1;//rise along the read
If (DATA) val=(val | I);//determine the value of
SCK=0;
}
DATA=https://bbs.csdn.net/topics/0;//read response signal, a response to 1, as the response to 0 through CPU drop-down to reply
SCN - L,//ninth pulse
_nop_ (); _ nop_ (); _nop_ ();//pulswith approx. 5 us
SCK=0;
DATA=https://bbs.csdn.net/topics/1;//release data bus
Temp_ h=val;
Val=0;
//low 8///////////////////////////////
DATA=https://bbs.csdn.net/topics/1;//release data bus
For (I=0 x80; i> 0; I/=2)//displacement eight
{SCK=1;//rise along the read
If (DATA) val=(val | I);//determine the value of
SCK=0;
}
DATA=https://bbs.csdn.net/topics/1;//0;//no need to reply by CPU drop-down to reply
SCK=1;//ninth pulse
Nop_ (); _ nop_ (); _ _nop_ ();//pulswith approx. 5 us
SCK=0;
DATA=https://bbs.csdn.net/topics/1;//release data bus
Temp_ LL=val;
//return ack;
}

The FDS. C (59) : error C132: 'I' : not in formal parameter list
The FDS. C (59) : error C244: 'val: can' t initialize, bad type or class
The FDS. C (59) : error C132: 'val: not in formal parameter list
The FDS. C (60) : error C244: 'temp_LL: can' t initialize, bad type or class
The FDS. C (60) : error C132: 'temp_LL: not in formal parameter list
The FDS. C (61) : error C244: 'temp_h: can' t initialize, bad type or class
The FDS. C (61) : error C132: 'temp_h: not in formal parameter list
The FDS. C (62) : error C244: 'DATA: can' t initialize, bad type or class
The FDS. C (62) : error C132: 'DATA: not in formal parameter list
The FDS. C (63) : error C141: syntax error near the 'for'
The FDS. C (63) : error C141: syntax error near '=' expected ')
The FDS. C (63) : error C129: missing '; 'before' & gt; '


  • Related