[FL-2812] RFID: write fix for some protocols #1828
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -170,6 +170,7 @@ bool protocol_keri_encoder_start(ProtocolKeri* protocol) {
|
||||
memset(protocol->encoded_data, 0, KERI_ENCODED_DATA_SIZE);
|
||||
*(uint32_t*)&protocol->encoded_data[0] = 0b00000000000000000000000011100000;
|
||||
bit_lib_copy_bits(protocol->encoded_data, 32, 32, protocol->data, 0);
|
||||
bit_lib_set_bits(protocol->encoded_data, 32, 1, 1);
|
||||
|
||||
protocol->encoder.last_bit =
|
||||
bit_lib_get_bit(protocol->encoded_data, KERI_ENCODED_BIT_SIZE - 1);
|
||||
@@ -224,6 +225,8 @@ bool protocol_keri_write_data(ProtocolKeri* protocol, void* data) {
|
||||
LFRFIDWriteRequest* request = (LFRFIDWriteRequest*)data;
|
||||
bool result = false;
|
||||
|
||||
// Start bit should be always set
|
||||
protocol->data[0] |= (1 << 7);
|
||||
protocol_keri_encoder_start(protocol);
|
||||
|
||||
if(request->write_type == LFRFIDWriteTypeT5577) {
|
||||
|
Reference in New Issue
Block a user