diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-02-29 08:53:20 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-02-29 08:53:20 +0000 |
commit | ad5b96d584fc9962a9d8504067cd59697fb9a580 (patch) | |
tree | a79230629a87dfbb65603d806467499ec632e4e8 /openpicc/application/iso14443_sniffer.c | |
parent | 4b03b310ffda11b017ce5166012a7139b09eee90 (diff) |
New cleaned-up (and then messed up again) SSC code
Better layering separation
git-svn-id: https://svn.openpcd.org:2342/trunk@434 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/iso14443_sniffer.c')
-rw-r--r-- | openpicc/application/iso14443_sniffer.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/openpicc/application/iso14443_sniffer.c b/openpicc/application/iso14443_sniffer.c index d5cf9c2..bc326b4 100644 --- a/openpicc/application/iso14443_sniffer.c +++ b/openpicc/application/iso14443_sniffer.c @@ -28,17 +28,21 @@ #include <errno.h> #include "openpicc.h" +#include "ssc_buffer.h" +#include "iso14443.h" #include "iso14443_sniffer.h" #include "iso14443_layer2a.h" #include "iso14443a_miller.h" #include "usb_print.h" #include "cmd.h" +#include "led.h" static iso14443_frame rx_frame; void iso14443_sniffer (void *pvParameters) { (void)pvParameters; + (void)rx_frame; int res; /* Delay until USB print etc. are ready */ @@ -57,11 +61,11 @@ void iso14443_sniffer (void *pvParameters) } usb_print_string("Carrier detected.\n\r"); - iso14443_l2a_rx_start(); while(true) { ssc_dma_rx_buffer_t *buffer = 0; res = iso14443_receive(NULL, &buffer, 20000 * portTICK_RATE_MS); if(res >= 0) { +#if 1 DumpStringToUSB("\n\r"); DumpTimeToUSB(xTaskGetTickCount()); usb_print_string(": Frame received, consists of "); @@ -86,6 +90,10 @@ void iso14443_sniffer (void *pvParameters) usb_print_string(" bits: "); DumpBufferToUSB((char*)rx_frame.data, rx_frame.numbytes + (rx_frame.numbits+7)/8 ); usb_print_string("\n\r"); +#else + DumpUIntToUSB(buffer->len_transfers); + DumpStringToUSB("\n\r"); +#endif portENTER_CRITICAL(); buffer->state = FREE; |