Hekateros/fw/Encoder/Encoder.c
uint16_t dbCalcCRC(void)
{
  uint16_t  addr;
  uint16_t  crc;

  // calculate crc over eeprom data excluding the magic number and the crc itself
  for(addr=EEPROM_ADDR_I2C_ADDR, crc=0; addr<EEPROM_CFG_LEN-2; ++addr)
  {
    crc += (uint16_t)eepromRead8(addr);
  }
  return crc;
}
/*!
 * \brief Caculcate the EEPROM database CRC.
 * \return Calculated CRC.
 */
\brief Caculcate the EEPROM database CRC.
\return Calculated CRC.
\ brief Caculcate the EEPROM database CRC . \ return Calculated CRC .
uint16_t dbCalcCRC(void)
{
  uint16_t  addr;
  uint16_t  crc;
  for(addr=EEPROM_ADDR_I2C_ADDR, crc=0; addr<EEPROM_CFG_LEN-2; ++addr)
  {
    crc += (uint16_t)eepromRead8(addr);
  }
  return crc;
}
uint16_t dbCalcCRC ( void ) { uint16_t addr ; uint16_t crc ; for ( addr = EEPROM_ADDR_I2C_ADDR , crc = 0 ; addr < EEPROM_CFG_LEN - 2 ; ++ addr ) { crc += ( uint16_t ) eepromRead8 ( addr ) ; } return crc ; }
\brief Caculcate the EEPROM database CRC.
\ brief Caculcate the EEPROM database CRC .
// calculate crc over eeprom data excluding the magic number and the crc itself