mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 13:03:13 +00:00
Remove kostyly, add raw debug
This commit is contained in:
parent
84abb53712
commit
87f8f1d9c4
1 changed files with 14 additions and 9 deletions
|
@ -3,14 +3,11 @@
|
|||
#include <furi.h>
|
||||
|
||||
#define ISO14443_4_BLOCK_PCB (1U << 1)
|
||||
#define ISO14443_4_BLOCK_PCB_I (0U)
|
||||
#define ISO14443_4_BLOCK_PCB_R (5U << 5)
|
||||
#define ISO14443_4_BLOCK_PCB_I (0U << 6)
|
||||
#define ISO14443_4_BLOCK_PCB_R (2U << 6)
|
||||
#define ISO14443_4_BLOCK_PCB_S (3U << 6)
|
||||
|
||||
//KOSTYLY
|
||||
#define ISO14443_4_BLOCK_PCB_I_ (0U << 6)
|
||||
#define ISO14443_4_BLOCK_PCB_R_ (2U << 6)
|
||||
#define ISO14443_4_BLOCK_PCB_TYPE_MASK (3U << 6)
|
||||
|
||||
#define ISO14443_4_BLOCK_PCB_S_DESELECT (0U << 4)
|
||||
#define ISO14443_4_BLOCK_PCB_S_WTX (3U << 4)
|
||||
#define ISO14443_4_BLOCK_PCB_BLOCK_NUMBER (1U << 0)
|
||||
|
@ -87,7 +84,7 @@ Iso14443_4aError iso14443_4_layer_decode_block_pwt_ext(
|
|||
const uint8_t pcb_field = bit_buffer_get_byte(block_data, 0);
|
||||
const uint8_t block_type = pcb_field & ISO14443_4_BLOCK_PCB_TYPE_MASK;
|
||||
switch(block_type) {
|
||||
case ISO14443_4_BLOCK_PCB_I_:
|
||||
case ISO14443_4_BLOCK_PCB_I:
|
||||
if(pcb_field == instance->pcb_prev) {
|
||||
bit_buffer_copy_right(output_data, block_data, 1);
|
||||
ret = Iso14443_4aErrorNone;
|
||||
|
@ -96,7 +93,7 @@ Iso14443_4aError iso14443_4_layer_decode_block_pwt_ext(
|
|||
ret = Iso14443_4aErrorProtocol;
|
||||
}
|
||||
break;
|
||||
case ISO14443_4_BLOCK_PCB_R_:
|
||||
case ISO14443_4_BLOCK_PCB_R:
|
||||
// TODO
|
||||
break;
|
||||
case ISO14443_4_BLOCK_PCB_S:
|
||||
|
@ -117,5 +114,13 @@ Iso14443_4aError iso14443_4_layer_decode_block_pwt_ext(
|
|||
}
|
||||
} while(false);
|
||||
|
||||
if(ret != Iso14443_4aErrorNone) {
|
||||
FURI_LOG_RAW_T("RAW RX:");
|
||||
for(size_t x = 0; x < bit_buffer_get_size_bytes(block_data); x++) {
|
||||
FURI_LOG_RAW_T("%02X ", bit_buffer_get_byte(block_data, x));
|
||||
}
|
||||
FURI_LOG_RAW_T("\r\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue