|
int Shift (int out) // sends and receives 9 bit from 0x100 first to 0x001 last
{ char i; // to receive send
int m;
int b=0;
m=0x100;
for (i=0; i<9; i++)
{ if (out&m) HighSda;
else LowSda;
DelayI2c();
HighScl;
if Sda b|=m;
LowScl;
m=m>>1;
}
return (b);
}
E-mail: info@telesys.ru