/* Add "d" into crc scope, caculate the new crc value */
static void h5_crc_update(uint16_t *crc, uint8_t d)
/* Add "d" into crc scope, caculate the new crc value */
static void h5_crc_update(uint16_t *crc, uint8_t d)
{
    uint16_t reg = *crc;
    reg = (reg >> 4) ^ crc_table[(reg ^ d) & 0x000f];
    reg = (reg >> 4) ^ crc_table[(reg ^ (d >> 4)) & 0x000f];
    *crc = reg;
}