/* Compute CRC of a buffer and compare it with the reference CRC.  */
static uint32_t compute_crc_and_compare(uint8_t *p_buffer, uint32_t ul_length, uint32_t ul_type, uint32_t ul_ref_crc)
/* Compute CRC of a buffer and compare it with the reference CRC.  */
static uint32_t compute_crc_and_compare(uint8_t *p_buffer, uint32_t ul_length, uint32_t ul_type, uint32_t ul_ref_crc)
{
	uint32_t ul_crc;
	ul_crc = compute_crc(p_buffer, ul_length, ul_type);
	if (ul_crc == ul_ref_crc) {
		puts("  CRC matches the reference value.\r");
	} else {
		puts("  CRC does NOT match the reference value.\r");
	}
	return ul_crc;
}