/* Calculates the CRC-8-CCITT. 
CRC-8-CCITT is defined to be x^8 + x^2 + x + 1 To use this function use the following template: crc = isp_crc8( crc, data );  */
static uint8_t isp_crc8(uint8_t inCrc, uint8_t inData)
/* Calculates the CRC-8-CCITT. 
CRC-8-CCITT is defined to be x^8 + x^2 + x + 1 To use this function use the following template: crc = isp_crc8( crc, data );  */
static uint8_t isp_crc8(uint8_t inCrc, uint8_t inData)
{
	uint8_t i;
	uint16_t data;
	data = inCrc ^ inData;
	data <<= 8;
	for (i = 0; i < 8; i++) {
		if ((data & 0x8000) != 0) {
			data = data ^ (BOOT_CFG1_CRC8_POLYNOMIAL << 7);
		}
		data = data << 1;
	}
	return (uint8_t)(data >> 8);
}