A simple CRC library used to verify configuration data

Fork of CRC by Andrew Lindsay

Revision:
2:53b7db1f47ea
Parent:
1:ec8513f94d23
Child:
3:599d283e5a44
--- a/crc.cpp	Tue May 14 22:14:09 2013 +0000
+++ b/crc.cpp	Tue Feb 02 13:56:09 2016 +0000
@@ -1,15 +1,15 @@
 
 #define CRC32_POLYNOMIAL 0xEDB88320L
 
-void CRC32Value(unsigned long &CRC, unsigned char c)
+void CRC32Value(unsigned long &CRCval, unsigned char c)
 {
     /////////////////////////////////////////////////////////////////////////////////////
     //CRC must be initialized as zero 
     //c is a character from the sequence that is used to form the CRC
     //this code is a modification of the code from the Novatel OEM615 specification
     /////////////////////////////////////////////////////////////////////////////////////
-    unsigned long ulTemp1 = ( CRC >> 8 ) & 0x00FFFFFFL;
-    unsigned long ulCRC = ((int) CRC ^ c ) & 0xff ;
+    unsigned long ulTemp1 = ( CRCval >> 8 ) & 0x00FFFFFFL;
+    unsigned long ulCRC = ((int) CRCval ^ c ) & 0xff ;
     for (int  j = 8 ; j > 0; j-- )
     {
         if ( ulCRC & 1 )
@@ -21,7 +21,7 @@
             ulCRC >>= 1;
         }
     }
-    CRC = ulTemp1 ^ ulCRC;
+    CRCval = ulTemp1 ^ ulCRC;
 } 
 
 /* --------------------------------------------------------------------------