OWIcrc.h File Reference

This graph shows which files directly or indirectly include this file:


Defines

#define OWI_CRC_OK   0x00
 CRC check succeded.
#define OWI_CRC_ERROR   0x01
 CRC check failed.

Functions

unsigned char OWI_ComputeCRC8 (unsigned char inData, unsigned char seed)
 Compute the CRC8 value of a data set.
unsigned int OWI_ComputeCRC16 (unsigned char inData, unsigned int seed)
 Compute the CRC16 value of a data set.
unsigned char OWI_CheckRomCRC (unsigned char *romValue)
 Calculate and check the CRC of a 64 bit ROM identifier.

Detailed Description

Atmel Corporation

Revision
1.7
Date
Thursday, August 19, 2004 14:27:16 UTC

Define Documentation

#define OWI_CRC_ERROR   0x01

CRC check failed.

#define OWI_CRC_OK   0x00

CRC check succeded.


Function Documentation

unsigned char OWI_CheckRomCRC ( unsigned char *  romValue  ) 

Calculate and check the CRC of a 64 bit ROM identifier.

This function computes the CRC8 value of the first 56 bits of a 64 bit identifier. It then checks the calculated value against the CRC value stored in ROM.

Parameters:
romvalue A pointer to an array holding a 64 bit identifier.
Return values:
OWI_CRC_OK The CRC's matched.
OWI_CRC_ERROR There was a discrepancy between the calculated and the stored CRC.

unsigned int OWI_ComputeCRC16 ( unsigned char  inData,
unsigned int  seed 
)

Compute the CRC16 value of a data set.

This function will compute the CRC16 of inData using seed as inital value for the CRC.

Parameters:
inData One byte of data to compute CRC from.
seed The starting value of the CRC.
Returns:
The CRC16 of inData with seed as initial value.
Note:
Setting seed to 0 computes the crc16 of the inData.

Constantly passing the return value of this function As the seed argument computes the CRC16 value of a longer string of data.

unsigned char OWI_ComputeCRC8 ( unsigned char  inData,
unsigned char  seed 
)

Compute the CRC8 value of a data set.

This function will compute the CRC8 or DOW-CRC of inData using seed as inital value for the CRC.

Parameters:
inData One byte of data to compute CRC from.
seed The starting value of the CRC.
Returns:
The CRC8 of inData with seed as initial value.
Note:
Setting seed to 0 computes the crc8 of the inData.

Constantly passing the return value of this function As the seed argument computes the CRC8 value of a longer string of data.


Generated on Thu Aug 21 14:29:39 2008 for Medidor de consumo by  doxygen 1.5.6