envea CAIRSENS PM Série Notice Technique page 71

Table des Matières

Publicité

Les langues disponibles

Les langues disponibles

34
Cairsens - UART Version
}
else
{
}
}
while
return
0;
}
unsigned int
CalculCrc(
lg)
{
unsigned int
const unsigned int
unsigned int
crc = 0;
for( j = 0
{
val = data[j + start];
crc = crc ^ val;
for( i_bits = 0 ; i_bits < 8 ; i_bits++ )
{
}
}
return
crc;
}
unsigned char
{
int
i;
if
(Reference)
{
Data[10] = Reference[0];
Data[11] = Reference[1];
Data[12] = Reference[2];
Data[13] = Reference[3];
Data[14] = Reference[4];
Data[15] = Reference[5];
Data[16] = Reference[6];
Data[17] = Reference[7];
}
else
{
{
memcpy(data, Tc_RX, i_Nmb_RX);
return
}
Sleep(200);
nb--;
(nb > 0);
unsigned char
crc = 0;
Poly = 0x8408;
j, val, carry, i_bits;
;
j < lg ; j++ )
carry = crc & 1;
crc >>= 1;
if
( carry > 0 )
*
GetTrame(unsigned char
i_Nmb_RX;
*data,
unsigned int
crc = crc ^ Poly;
* Data,
unsigned char
start ,
unsigned int
*Reference)
© 2016 Cairpol

Publicité

Chapitres

Table des Matières
loading

Ce manuel est également adapté pour:

Cairsens pm1Cairsens pm2.5Cairsens pm10

Table des Matières