]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/BigBuf.c
HitagS Improvements (#721)
[proxmark3-svn] / armsrc / BigBuf.c
index 8870f426fa2b05d46ebe2fa57c374183c7d0a3ab..4b1264b6684abc375af7c0ca51967a82fc6730ab 100644 (file)
@@ -136,6 +136,10 @@ void set_tracing(bool enable) {
        tracing = enable;
 }
 
+bool get_tracing(void) {
+       return tracing;
+}
+
 /**
  * Get the number of bytes traced
  * @return
@@ -225,8 +229,11 @@ int LogTraceHitag(const uint8_t * btBytes, int iBits, int iSamples, uint32_t dwP
 
        uint8_t *trace = BigBuf_get_addr();
        uint16_t iLen = nbytes(iBits);
+
        // Return when trace is full
-       if (traceLen + sizeof(rsamples) + sizeof(dwParity) + sizeof(iBits) + iLen > BigBuf_max_traceLen()) return false;
+       if (traceLen + sizeof(rsamples) + sizeof(dwParity) + sizeof(iBits) + iLen > BigBuf_max_traceLen()) {
+               return false;
+       }       
 
        //Hitag traces appear to use this traceformat:
        // 32 bits timestamp (little endian,Highest Bit used as readerToTag flag)
@@ -234,6 +241,8 @@ int LogTraceHitag(const uint8_t * btBytes, int iBits, int iSamples, uint32_t dwP
        // 8 bits size (number of bits in the trace entry, not number of bytes)
        // y Bytes data
 
+
+
        rsamples += iSamples;
        trace[traceLen++] = ((rsamples >> 0) & 0xff);
        trace[traceLen++] = ((rsamples >> 8) & 0xff);
Impressum, Datenschutz