tools/firmware-utils/src/cyg_crc32.c
/* Return a 32-bit CRC of the contents of the buffer accumulating the
   result from a previous CRC calculation. This uses the Ethernet FCS
   algorithm.*/
Return a 32-bit CRC of the contents of the buffer accumulating the
result from a previous CRC calculation. This uses the Ethernet FCS
algorithm.
Return a 32 - bit CRC of the contents of the buffer accumulating the result from a previous CRC calculation . This uses the Ethernet FCS algorithm .
cyg_uint32
cyg_ether_crc32_accumulate(cyg_uint32 crc32val, unsigned char *s, int len)
{
  int i;
  if (s == 0) return 0L;
  crc32val = crc32val ^ 0xffffffff;
  for (i = 0;  i < len;  i++) {
      crc32val = crc32_tab[(crc32val ^ s[i]) & 0xff] ^ (crc32val >> 8);
  }
  return crc32val ^ 0xffffffff;
}
cyg_uint32 cyg_ether_crc32_accumulate ( cyg_uint32 crc32val , unsigned char * s , int len ) { int i ; if ( s == 0 ) return 0L ; crc32val = crc32val ^ 0xffffffff ; for ( i = 0 ; i < len ; i ++ ) { crc32val = crc32_tab [ ( crc32val ^ s [ i ] ) & 0xff ] ^ ( crc32val >> 8 ) ; } return crc32val ^ 0xffffffff ; }
Return a 32-bit CRC of the contents of the buffer accumulating the
result from a previous CRC calculation.
Return a 32 - bit CRC of the contents of the buffer accumulating the result from a previous CRC calculation .