CRC_mem

Description

This function calculates the CRC of a block of RAM.

Before the CRC library is included, the constant CRC_POLY must be defined. Valid values are:

	const CRC_POLY = 0x1021		// CRC CCITT
	const CRC_POLY = 0x8408		// CRC CCITT reversed
	const CRC_POLY = 0x8005		// CRC16
	const CRC_POLY = 0xA001		// CRC16 reversed

Definition

uint CRC_mem(ubyte len, ubyte *buff)

Library

LIB/crc_lib.bas

Usage

On entry:
len is the length of the RAM buffer for which the CRC is to be calculated
buff is the address of the RAM buffer for which the CRC is to be calculated
On exit:
return 16 bit CRC