/* This function calculates the CRC16 of the input data.  */
static uint16_t _eval_crc_16(const uint8_t *puc_buf_ptr, uint32_t ul_len, uint32_t ul_crc_init)
/* This function calculates the CRC16 of the input data.  */
static uint16_t _eval_crc_16(const uint8_t *puc_buf_ptr, uint32_t ul_len, uint32_t ul_crc_init)
{
	uint16_t us_crc;
	us_crc = ul_crc_init;
	while (ul_len--) {
		us_crc = (uint16_t)(pus_crc16_table [(us_crc >> 8) & 0xff] ^
				(us_crc << 8) ^ (*puc_buf_ptr++ & 0x00ff));
	}
	return us_crc;
}