- uint32_t temp = (value << cmd_sz) | (byte_index << 1) | legicCmd;
- crc_update(&legic_crc, temp, cmd_sz + 8 );
+ //uint32_t temp = (value << cmd_sz) | (byte_index << 1) | legicCmd;
+ //crc_update(&legic_crc, temp, cmd_sz + 8 );
+ crc_update(&legic_crc, 1, 1); /* CMD_READ */
+ crc_update(&legic_crc, byte_index, cmd_sz-1);
+ crc_update(&legic_crc, value, 8);