Index: Utilities.c =================================================================== diff -u -r05865adfbc69954f5388f6f4d98a1edcef76c275 -r5ee17a0938696af25993a415a033ed786c819869 --- Utilities.c (.../Utilities.c) (revision 05865adfbc69954f5388f6f4d98a1edcef76c275) +++ Utilities.c (.../Utilities.c) (revision 5ee17a0938696af25993a415a033ed786c819869) @@ -26,7 +26,6 @@ // ********** private definitions ********** -#define INITIAL_CRC32_VAL 0x00000000 ///< Seed for 32-bit CRC function #define INITIAL_CRC16_VAL 0xFFFF ///< Seed for 16-bit CRC function #define INITIAL_CRC08_VAL 0x00 ///< Seed for 8-bit CRC function @@ -148,9 +147,9 @@ * @param len number of bytes in the memory range to calculate CRC for * @return CRC as a U32 *************************************************************************/ -U32 crc32( const U08 *address, U32 len ) +U32 crc32( U32 const initialValue, const U08 *address, U32 len ) { - U32 crc = INITIAL_CRC32_VAL; + U32 crc = initialValue; while ( len-- > 0 ) { Index: Utilities.h =================================================================== diff -u -r05865adfbc69954f5388f6f4d98a1edcef76c275 -r5ee17a0938696af25993a415a033ed786c819869 --- Utilities.h (.../Utilities.h) (revision 05865adfbc69954f5388f6f4d98a1edcef76c275) +++ Utilities.h (.../Utilities.h) (revision 5ee17a0938696af25993a415a033ed786c819869) @@ -82,7 +82,7 @@ // ********** public function prototypes ********** -U32 crc32( const U08 *address, U32 len ); +U32 crc32( U32 const initialValue, const U08 *address, U32 len ); U16 crc16( const U08 *address, U32 len ); U08 crc8( const U08 *address, U32 len ); U32 u32DiffWithWrap( U32 start, U32 end );