Return Value; Example; None - Advantech ADAM-5511 Manual

Table of Contents

Advertisement

CRC16
Syntax:
unsigned int CRC16(char *data_p, unsigned int length)
Description:
Calculates the CRC 16-bit value of the string *data_p.
Parameter
*data_p
length

Return value:

The CRC16 code.

Example:

unsigned char String[]="this is a test CRC16";
void main()
{
unsigned int code;
code = CRC16(String, strlen(String));
printf("\n The string %s CRC16 code = %d", String, Code);
}
Remarks:

None.

Description
The string which you want to calculate
CRC code.
The length of string *data_p.

Advertisement

Table of Contents
loading

Table of Contents