[an error occurred while processing this directive]
|
#define MSG_LEN 23
#define MAX_TX 3struct rx_data
{
char bit_count;
unsigned track : 1;
unsigned store_bc : 7;
long buf_h;
long buf_l;
};long cof[]={0xf8dd4258,
0xf9a42bb0,
0xf930b51c,
0xfa2561cc};struct rx_data db[MAX_TX];
char h_weight(long word)
{
char l;
char sum=0;
for(l=0;l{
sum+=(0x8000000l&word?1:0);
word<<=1;
}
return sum;
}void main()
{
char crls,t;for(t=0;t
db[t].buf_h=cof[t];
crls=0;
for(t=0;tcrls+=h_weight(db[t].buf_h^cof[t])-16; //to disable removing redundant code
//PORTD=clrs;
}
E-mail: info@telesys.ru