summaryrefslogtreecommitdiff
path: root/openpicc/application/iso14443_layer3a.c
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-14 23:13:20 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-14 23:13:20 +0000
commit5a29168eaddaaa47909f2ae84c41d0743996215f (patch)
tree2767987f0ce4fabcaf3670e232fa81c86a934d81 /openpicc/application/iso14443_layer3a.c
parente777e32afb32f8863d495eff68ea0a91b0793fac (diff)
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
Diffstat (limited to 'openpicc/application/iso14443_layer3a.c')
-rw-r--r--openpicc/application/iso14443_layer3a.c6
1 files changed, 4 insertions, 2 deletions
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
personal git repositories of Harald Welte. Your mileage may vary