File:  [ELWIX - Embedded LightWeight unIX -] / libaitcrc / example / test.c
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Wed Aug 29 09:00:44 2012 UTC (12 years, 2 months ago) by misho
Branches: MAIN
CVS tags: crc2_4, HEAD, CRC2_3
version 3.2

#include <stdio.h>
#include <sys/types.h>
#include <aitcrc.h>


int main()
{
       	u_char pd[7] = { 0xFF, 0x01, 0x00, 0x04, 0x3F, 0x00, 0x01 };
	u_char pp[8] = { 0xA0, 0x00, 0x00, 0x04, 0x20, 0x00, 0xAF, 0x01 };

	printf("reflect=%u\n", crcReflect(3001123, 32));

	printf("pelco_d=0x%x pelco_p=0x%x\n", crcPelco('d', pd), crcPelco('p', pp));

	return 0;
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>