]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - common/lfdemod.c
CHG: trying to get the askdemod / biphasedeocde / finding startmarker / removeparity...
[proxmark3-svn] / common / lfdemod.c
index 7d40d22e5aa44551835ae4ada1f69947f132e488..62f52a2f0f4d2d3f0cce596b38a9f32b52ebadf2 100644 (file)
@@ -589,6 +589,20 @@ size_t removeParity(uint8_t *BitStream, size_t startIdx, uint8_t pLen, uint8_t p
        //return ID start index and size
        return bitCnt;
 }
        //return ID start index and size
        return bitCnt;
 }
+// Ask/Biphase Demod then try to locate an ISO 11784/85 ID
+// BitStream must contain previously askrawdemod and biphasedemoded data
+int ISO11784demodBI(uint8_t *dest, size_t *size)
+{
+       //make sure buffer has enough data
+       if (*size < 128) return -1;
+
+       size_t startIdx = 0;
+       uint8_t preamble[] = {0,0,0,0,0,0,0,0,0,0,1};
+
+       uint8_t errChk = preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx);
+       if (errChk == 0) return -2; //preamble not found
+       return (int)startIdx;
+}
 
 // by marshmellow
 // FSK Demod then try to locate an AWID ID
 
 // by marshmellow
 // FSK Demod then try to locate an AWID ID
Impressum, Datenschutz