Zektor CVS4 User Manual page 29

High definition component video switch
Hide thumbs Also See for CVS4:
Table of Contents

Advertisement

Checksums and CRC-8's (Cont'd)
int main( void)
{
char
unsigned char
int
char
crc8 = CRC8_INIT;
// CRC8 all of TestString[]
index = 0;
while (TestString[index] != 0)
crcByte( &crc8, TestString[index++]);
// Add the CRC-8 token character ':' to CRC-8
crcByte( &crc8, token);
// Finish with CRC8 by doing a one's compliment
crc8 = ~crc8;
// Print the results
printf( "%s%c%u", TestString, token, (unsigned char)crc8);
return (0);
}
TestString[] = "LI 2,3";
crc8;
index;
token = ':';
// initialize checkcode
CVS4 Component Video Switch
2

Advertisement

Table of Contents
loading

Table of Contents