Merge remote-tracking branch 'ofw/dev' into mntm-dev

This commit is contained in:
Willy-JL
2024-10-14 23:44:44 +01:00
167 changed files with 6280 additions and 2155 deletions
+1 -8
View File
@@ -33,7 +33,7 @@
#define ISO14443_4_BLOCK_PCB_S_CID_MASK (1U << ISO14443_4_BLOCK_PCB_R_CID_OFFSET)
#define ISO14443_4_BLOCK_PCB_S_WTX_DESELECT_MASK (3U << ISO14443_4_BLOCK_PCB_S_WTX_DESELECT_OFFSET)
#define ISO14443_4_BLOCK_PCB_BITS_ACTIVE(pcb, mask) (((pcb) & mask) == mask)
#define ISO14443_4_BLOCK_PCB_BITS_ACTIVE(pcb, mask) (((pcb) & (mask)) == (mask))
#define ISO14443_4_BLOCK_PCB_IS_R_BLOCK(pcb) \
ISO14443_4_BLOCK_PCB_BITS_ACTIVE(pcb, ISO14443_4_BLOCK_PCB_R_MASK)
@@ -121,13 +121,6 @@ bool iso14443_4_layer_decode_block(
bool ret = false;
// TODO: Fix properly! this is a very big kostyl na velosipede
// (bit_buffer_copy_right are called to copy bigger buffer into smaller buffer causing crash on furi check) issue comes iso14443_4a_poller_send_block at line 109
// Mimicks furi_check()s in bit_buffer_copy_right(): buf=output_data other=block_data start_index=1
if(!(bit_buffer_get_size_bytes(block_data) > 1)) return ret;
if(!(bit_buffer_get_capacity_bytes(output_data) >= bit_buffer_get_size_bytes(block_data) - 1))
return ret;
do {
if(ISO14443_4_BLOCK_PCB_IS_R_BLOCK(instance->pcb_prev)) {
const uint8_t response_pcb = iso14443_4_layer_get_response_pcb(block_data);
@@ -65,10 +65,8 @@ static NfcCommand iso14443_4a_listener_run(NfcGenericEvent event, void* context)
if(instance->state == Iso14443_4aListenerStateIdle) {
if(bit_buffer_get_size_bytes(rx_buffer) == 2 &&
bit_buffer_get_byte(rx_buffer, 0) == ISO14443_4A_CMD_READ_ATS) {
if(iso14443_4a_listener_send_ats(instance, &instance->data->ats_data) !=
if(iso14443_4a_listener_send_ats(instance, &instance->data->ats_data) ==
Iso14443_4aErrorNone) {
command = NfcCommandContinue;
} else {
instance->state = Iso14443_4aListenerStateActive;
}
}
@@ -93,7 +91,6 @@ static NfcCommand iso14443_4a_listener_run(NfcGenericEvent event, void* context)
if(instance->callback) {
command = instance->callback(instance->generic_event, instance->context);
}
command = NfcCommandContinue;
}
return command;