From 8bfad8b9ab2672a53e4839a946651e85b5ad02b6 Mon Sep 17 00:00:00 2001 From: turbocool3r Date: Wed, 19 Jun 2024 21:52:12 +0300 Subject: [PATCH] Small improvements to the tx buffer handling. --- firmware/application/src/rfid/nfctag/hf/nfc_14a.c | 1 + firmware/application/src/rfid/nfctag/hf/nfc_14a.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/application/src/rfid/nfctag/hf/nfc_14a.c b/firmware/application/src/rfid/nfctag/hf/nfc_14a.c index 352efc8a..d1cd700f 100644 --- a/firmware/application/src/rfid/nfctag/hf/nfc_14a.c +++ b/firmware/application/src/rfid/nfctag/hf/nfc_14a.c @@ -295,6 +295,7 @@ uint8_t nfc_tag_14a_unwrap_frame(const uint8_t *pbtFrame, const size_t szFrameBi * @param[in] appendCrc Whether to send the byte flow, automatically send the CRC16 verification automatically */ void nfc_tag_14a_tx_bytes(uint8_t *data, uint32_t bytes, bool appendCrc) { + ASSERT(bytes <= MAX_NFC_TX_BUFFER_SIZE); NFC_14A_TX_BYTE_CORE(data, bytes, appendCrc, NRF_NFCT_FRAME_DELAY_MODE_WINDOWGRID); } diff --git a/firmware/application/src/rfid/nfctag/hf/nfc_14a.h b/firmware/application/src/rfid/nfctag/hf/nfc_14a.h index f70fc1fd..c103c02f 100644 --- a/firmware/application/src/rfid/nfctag/hf/nfc_14a.h +++ b/firmware/application/src/rfid/nfctag/hf/nfc_14a.h @@ -3,7 +3,7 @@ #include "tag_emulation.h" -#define MAX_NFC_RX_BUFFER_SIZE 64 +#define MAX_NFC_RX_BUFFER_SIZE 257 #define MAX_NFC_TX_BUFFER_SIZE 64 #define NFC_TAG_14A_CRC_LENGTH 2