]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
Minor tweaks to iso14443b snoop tracing
authorMartin Holst Swende <martin@swende.se>
Tue, 27 Jan 2015 15:34:11 +0000 (16:34 +0100)
committerMartin Holst Swende <martin@swende.se>
Tue, 27 Jan 2015 15:34:11 +0000 (16:34 +0100)
armsrc/iso14443.c

index 39112fdfce543cdbc8e0d373013f69957942615f..1191c5bf5996f89ff9d9495438b282b688b11009 100644 (file)
@@ -633,6 +633,8 @@ static void UartReset()
        Uart.output = ((uint8_t *)BigBuf) + RECV_CMD_OFFSET;
        Uart.byteCntMax = MAX_FRAME_SIZE;
        Uart.state = STATE_UNSYNCD;
+       Uart.byteCnt = 0;
+       Uart.bitCnt = 0;
 }
 
 /*
@@ -1109,11 +1111,13 @@ void RAMFUNC SnoopIso14443(void)
 
         samples += 2;
 
-        if(Handle14443UartBit(ci & 1)) {
+               if(Handle14443UartBit(ci & 1)) {
                        if(triggered && tracing) {
                                GetParity(Uart.output, Uart.byteCnt, parity);
                                LogTrace(Uart.output,Uart.byteCnt,samples, samples,parity,TRUE);
                        }
+                       if(Uart.byteCnt==0) Dbprintf("[1] Error, Uart.byteCnt==0, Uart.bitCnt=%d", Uart.bitCnt);
+
                        /* And ready to receive another command. */
                        UartReset();
                        /* And also reset the demod code, which might have been */
@@ -1125,6 +1129,8 @@ void RAMFUNC SnoopIso14443(void)
                                GetParity(Uart.output, Uart.byteCnt, parity);
                                LogTrace(Uart.output,Uart.byteCnt,samples, samples,parity,TRUE);
                        }
+                       if(Uart.byteCnt==0) Dbprintf("[2] Error, Uart.byteCnt==0, Uart.bitCnt=%d", Uart.bitCnt);
+
                        /* And ready to receive another command. */
                        UartReset();
                        /* And also reset the demod code, which might have been */
Impressum, Datenschutz