X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/8c6cca0ba1424200dcb872eb96918281c9e62784..6b882a3918590b9c0f45643323adae9862eedde5:/armsrc/iso15693.c diff --git a/armsrc/iso15693.c b/armsrc/iso15693.c index 9479c3c0..da2aab69 100644 --- a/armsrc/iso15693.c +++ b/armsrc/iso15693.c @@ -175,6 +175,8 @@ static void CodeIso15693AsReader(uint8_t *cmd, int n) for(i = 0; i < 4; i++) { ToSendStuffBit(1); } + + ToSendMax++; } // encode data using "1 out of 256" scheme @@ -837,6 +839,7 @@ static void DecodeReaderInit(uint8_t *data, uint16_t max_len, DecodeReader_t* De DecodeReader->state = STATE_READER_UNSYNCD; DecodeReader->byteCount = 0; DecodeReader->bitCount = 0; + DecodeReader->posCount = 0; DecodeReader->shiftReg = 0; } @@ -861,7 +864,7 @@ static int GetIso15693CommandFromReader(uint8_t *received, size_t max_len, uint3 uint8_t dmaBuf[ISO15693_DMA_BUFFER_SIZE]; // the decoder data structure - DecodeReader_t DecodeReader; + DecodeReader_t DecodeReader = {0}; DecodeReaderInit(received, max_len, &DecodeReader); // wait for last transfer to complete