Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of CRC by
Diff: crc.cpp
- Revision:
- 2:53b7db1f47ea
- Parent:
- 1:ec8513f94d23
- Child:
- 3:599d283e5a44
diff -r ec8513f94d23 -r 53b7db1f47ea crc.cpp
--- 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;
 } 
 
 /* --------------------------------------------------------------------------
    