Vital Product Data (VPD) Introduction
http://www.motorola.com/computer/literature
B-13
B
SROM_CRC.C
/*
* srom_crc - generate CRC data for the passed buffer
* description:
* This function’s purpose is to generate the CRC for the
* passed buffer.
* call:
* argument #1 = buffer pointer
* argument #2 = number of elements
* return:
* CRC data
*/
unsigned int
srom_crc(elements_p, elements_n)
register unsigned char *elements_p; /* buffer pointer */
register unsigned int elements_n; /* number of elements */
{
register unsigned int crc;
register unsigned int crc_flipped;
register unsigned char cbyte;
register unsigned int index, dbit, msb;
crc = 0xffffffff;
for (index = 0; index < elements_n; index++) {
cbyte = *ele+;
for (dbit = 0; dbit < 8; dbit++) {
msb = (crc >> 31) & 1;
crc <<= 1;
if (msb ^ (cbyte & 1)) {
crc ^= 0x04c11db6;
crc |= 1;
}
cbyte >>= 1;
}
}
crc_flipped = 0;
for (index = 0; index < 32; index++) {
crc_flipped <<= 1;
dbit = crc & 1;
crc >>= 1;
crc_f= dbit;
}
crc = crc_flipped ^ 0xffffffff;
return (crc);
}
Summary of Contents for MVME5100 Series
Page 1: ...MVME5100 Single Board Computer Programmer s Reference Guide V5100A PG2 September 2001 Edition ...
Page 16: ...xvi ...
Page 20: ...xx ...
Page 28: ...xxviii ...
Page 62: ...1 34 Computer Group Literature Center Web Site Product Data and Memory Maps 1 ...
Page 278: ...3 88 Computer Group Literature Center Web Site System Memory Controller SMC 3 ...
Page 288: ...4 10 Computer Group Literature Center Web Site Hawk Programming Details 4 ...
Page 320: ...Index IN 12 Computer Group Literature Center Web Site I N D E X ...