5-12
Computer Group Literature Center Web Site
Remote Start Via the PCI Bus
5
Reference Function: srom_crc.c
/*
* srom_crc - generate CRC data for the passed buffer
* description:
*This function’s purpose is to generate the CRC for thepassed
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++) {
Содержание MCPN750A
Страница 2: ...MCPN750A CompactPCI Single Board Computer Installation and Use MCPN750A IH5 September 2001 Edition ...
Страница 13: ...xii ...
Страница 15: ...xiv ...
Страница 53: ...1 32 Computer Group Literature Center Web Site Hardware Preparation and Installation 1 ...
Страница 67: ...2 14 Computer Group Literature Center Web Site Startup and Operation 2 ...
Страница 105: ...5 14 Computer Group Literature Center Web Site Remote Start Via the PCI Bus 5 ...
Страница 167: ...7 38 Computer Group Literature Center Web Site Connector Pin Assignments 7 ...
Страница 171: ...A 4 Computer Group Literature Center Web Site Specifications A ...
Страница 187: ...Index IN 10 Computer Group Literature Center Web Site I N D E X ...