RTDM Cumulative CRC16 Function
This function calculates the polynomial for the checksum byte.
There are two approaches to calculating this number:
- “On-the-fly” every time. Saves code space because no const table is required. This approach saves code space but yields slower throughput performance.
- Use a coefficients table. This approach has faster performance but consumes a higher amount of program memory.
unsigned int RTDM_CumulativeCrc16 (unsigned char *buf, unsigned int u16Length, unsigned int u16CRC );
|unsigned char *buf||A pointer to the state memory for the data to be used on the checksum calculation|
|unsigned int u16Length||Number of bytes to be computed|
|unsigned int u16CRC||Polynomial value used to calculate the CRC16 checksum|
CRC16 checksum value
Microchip Technology acquires Atmel