From dd7a3c208ce3720fa83fc41823d532ced30d1819 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 13 Jul 2020 22:06:15 +0200 Subject: [PATCH] init arrays... --- armsrc/iso15693.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/armsrc/iso15693.c b/armsrc/iso15693.c index 82640d0cb..c12e2837b 100644 --- a/armsrc/iso15693.c +++ b/armsrc/iso15693.c @@ -621,7 +621,7 @@ static void DecodeTagReset(DecodeTag_t *DecodeTag) { int GetIso15693AnswerFromTag(uint8_t* response, uint16_t max_len, uint16_t timeout, uint32_t *eof_time) { int samples = 0, ret = 0; - uint16_t dmaBuf[ISO15693_DMA_BUFFER_SIZE]; + uint16_t dmaBuf[ISO15693_DMA_BUFFER_SIZE] = {0}; // the Decoder data structure DecodeTag_t DecodeTag = { 0 }; @@ -678,7 +678,7 @@ int GetIso15693AnswerFromTag(uint8_t* response, uint16_t max_len, uint16_t timeo } if (samples > timeout && DecodeTag.state < STATE_TAG_RECEIVING_DATA) { - ret = -1; // timeout + ret = -3; // timeout break; } @@ -704,7 +704,7 @@ int GetIso15693AnswerFromTag(uint8_t* response, uint16_t max_len, uint16_t timeo Dbprintf("timing: sof_time = %d, eof_time = %d", (sof_time * 4), (*eof_time * 4)); } - if (ret == -1) { + if (ret == -1) { return ret; } @@ -1016,7 +1016,7 @@ int GetIso15693CommandFromReader(uint8_t *received, size_t max_len, uint32_t *eo int samples = 0; bool gotFrame = false; - uint8_t dmaBuf[ISO15693_DMA_BUFFER_SIZE]; + uint8_t dmaBuf[ISO15693_DMA_BUFFER_SIZE] = {0}; // the decoder data structure DecodeReader_t DecodeReader = {0}; @@ -1148,7 +1148,7 @@ void SniffIso15693(uint8_t jam_search_len, uint8_t *jam_search_string) { set_tracing(true); // The DMA buffer, used to stream samples from the FPGA - uint16_t dmaBuf[ISO15693_DMA_BUFFER_SIZE]; + uint16_t dmaBuf[ISO15693_DMA_BUFFER_SIZE] = {0}; // Count of samples received so far, so that we can include timing // information in the trace buffer.