summaryrefslogtreecommitdiff
path: root/openpicc/application/iso14443_layer3a.c
diff options
context:
space:
mode:
Diffstat (limited to 'openpicc/application/iso14443_layer3a.c')
-rw-r--r--openpicc/application/iso14443_layer3a.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/openpicc/application/iso14443_layer3a.c b/openpicc/application/iso14443_layer3a.c
index 7d91250..b9ee0b9 100644
--- a/openpicc/application/iso14443_layer3a.c
+++ b/openpicc/application/iso14443_layer3a.c
@@ -297,6 +297,17 @@ void iso14443_layer3a_state_machine (void *pvParameters)
main_help_print_buffer(buffer, &pktcount);
}
vLedBlinkGreen();
+ if(1) {
+ int i = usb_print_set_default_flush(0);
+ DumpBufferToUSB((char*)buffer->data, buffer->len/8);
+ DumpStringToUSB(" Decoded: ");
+ 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");
+ usb_print_set_default_flush(i);
+ }
switch(state) {
case IDLE:
@@ -309,14 +320,6 @@ void iso14443_layer3a_state_machine (void *pvParameters)
LAYER3_DEBUG(", woke up to send ATQA\n\r");
atqa_sent = 0;
}
- if(1) {
- DumpStringToUSB("Decoded: ");
- 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
* Normally we'd go to anticol from here*/
vTaskDelay(portTICK_RATE_MS);
@@ -330,12 +333,6 @@ void iso14443_layer3a_state_machine (void *pvParameters)
break;
case ACTIVE:
case ACTIVE_STAR:
-#if 0
- DumpStringToUSB("Decoded: ");
- decoder_decode(DECODER_MILLER, (const char*)buffer->data, buffer->len, received_buffer);
- DumpBufferToUSB((char*)received_buffer, 100);
- DumpStringToUSB("\n\r");
-#endif
/* Wait for another frame */
if(0) {
ssc_rx_mode_set(SSC_MODE_14443A_STANDARD);
personal git repositories of Harald Welte. Your mileage may vary