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. |
#define OWI_CRC_ERROR 0x01 |
CRC check failed.
#define OWI_CRC_OK 0x00 |
CRC check succeded.
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.
romvalue | A pointer to an array holding a 64 bit identifier. |
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.
inData | One byte of data to compute CRC from. | |
seed | The starting value of the CRC. |
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.
inData | One byte of data to compute CRC from. | |
seed | The starting value of the CRC. |
Constantly passing the return value of this function As the seed argument computes the CRC8 value of a longer string of data.