15
/*=======================================================================*/
/* Function that calculates CRC-CCITT 16 bits
/* INPUT:
/* unsigned char *inbuffer : 8 bits input vector over which CRC checksum is calculated
/* must termined by 0x00
/* OUTPUT:
/* unsigned int: 16 bits return of crc_ccitt checksum
/*=======================================================================*/
/* OVERVIEW:
/*
Width = 16 bits
/*
Truncated polynomial = 0x1021
/*
Initial value = 0xFFFF
/*
No XOR is performed on the output CRC
/* DESCRIPTION:
/*
Computing a POLY number from the crc equation.
/*
Crc s are usually expressed as an polynomial expression such as:
/*
/*
x^16 + x^12 + x^5 + 1
/* CHECK
/*
0xE5CC This is the checksum for the ascii string "123456789"
/* EXAMPLE
/* http://www.zorc.breitbandkatze.de/crc.html
*=======================================================================*/
#define crc_poly 0x1021
// Polynome du CRC-CCITT-16Bits
unsigned int crc_ccitt16 (unsigned char *inbuffer) {
unsigned int crc_checksum = 0xffff;
unsigned char ch;
char i,xor_flag;
while ( *inbuffer!=0)
{
ch = *i+;
for(i=0; i<8; i++)
{
xor_flag=(crc_checksum & 0x8000)? 1:0;
crc_checksum = crc_checksum << 1;
if (ch & 0x80) crc_c+;
if (xor_flag) crc_checksum = crc_checksum ^ crc_poly;
ch = ch << 1;
}
}
for(i=0; i<16; i++)
{
xor_flag=(crc_checksum & 0x8000)? 1:0;
crc_checksum = crc_checksum << 1;
Summary of Contents for RT100V8BT
Page 8: ...8 Bluetooth Disable Scan Disable Bluetooth Bluetooth Button IN OUT Scan 1 2 3 4 5 ...
Page 16: ...16 if xor_flag crc_checksum crc_checksum crc_poly return crc_checksum ...
Page 19: ...19 The number of the Com port is shown Number of Port Com connected with the V8BTBT ...
Page 24: ...24 Menu Realtrace Terminal Language Selection Keyboard Type Communication Port Selection ...
Page 26: ...26 Connect Simple view only ISO number ...
Page 27: ...27 Showing all data ...