/* Implementation note The data byte is treated as two nibbles. The crc is generated in reverse, i.e., bits are fed into the register from the top.  */
static void bcsp_crc_update(u16 *crc, u8 d)
/* Implementation note The data byte is treated as two nibbles. The crc is generated in reverse, i.e., bits are fed into the register from the top.  */
static void bcsp_crc_update(u16 *crc, u8 d)
{
	u16 reg = *crc;
	reg = (reg >> 4) ^ crc_table[(reg ^ d) & 0x000f];
	reg = (reg >> 4) ^ crc_table[(reg ^ (d >> 4)) & 0x000f];
	*crc = reg;
}