From 5a29168eaddaaa47909f2ae84c41d0743996215f Mon Sep 17 00:00:00 2001 From: henryk Date: Fri, 14 Dec 2007 23:13:20 +0000 Subject: Sanitize and clarify the len handling in rx buffers. Fix miller decoder git-svn-id: https://svn.openpcd.org:2342/trunk@387 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/application/iso14443_layer3a.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'openpicc/application/iso14443_layer3a.c') diff --git a/openpicc/application/iso14443_layer3a.c b/openpicc/application/iso14443_layer3a.c index 4e077d5..7d91250 100644 --- a/openpicc/application/iso14443_layer3a.c +++ b/openpicc/application/iso14443_layer3a.c @@ -311,8 +311,10 @@ void iso14443_layer3a_state_machine (void *pvParameters) } if(1) { DumpStringToUSB("Decoded: "); - iso14443a_decode_miller(&received_frame, buffer->data, buffer->len); - DumpBufferToUSB((char*)received_frame.data, 100); + DumpUIntToUSB(buffer->len); + DumpStringToUSB(" "); + iso14443a_decode_miller(&received_frame, buffer->data, buffer->len/8); + DumpBufferToUSB((char*)received_frame.data, received_frame.numbytes + (received_frame.numbits+7)/8); DumpStringToUSB("\n\r"); } /* For debugging, wait 1ms, then wait for another frame -- cgit v1.2.3