/* Calculates a 16-bit CRC value over the specified data using byte wise computation with a table.  */
uint16_t UtilChecksumCrc16Calculate(uint8_t const *data, uint32_t len)
/* Calculates a 16-bit CRC value over the specified data using byte wise computation with a table.  */
uint16_t UtilChecksumCrc16Calculate(uint8_t const *data, uint32_t len)
{
  uint16_t result = 0;
  uint32_t byteIdx;
  assert(data != NULL);
  assert(len > 0);
  if ( (data != NULL) && (len > 0) )
  {
    for (byteIdx = 0; byteIdx < len; byteIdx++)
    {
      result = ((uint16_t)(result << 8)) ^ 
               utilChecksumCrc16Table[(uint8_t)(data[byteIdx] ^ (result >> 8))];
    }
  }
  return result;
}