+// find nedap preamble in already demoded data
+int NedapDemod(uint8_t *dest, size_t *size) {
+ //make sure buffer has data
+ if (*size < 128) return -3;
+
+ size_t startIdx = 0;
+ //uint8_t preamble[] = {1,1,1,1,1,1,1,1,1,0,0,0,1};
+ uint8_t preamble[] = {1,1,1,1,1,1,1,1,1,0};
+ if (!preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx))
+ return -4; //preamble not found
+ return (int) startIdx;
+}
+
+// Find IDTEC PSK1, RF Preamble == 0x4944544B, Demodsize 64bits
+// by iceman
+int IdteckDemodPSK(uint8_t *dest, size_t *size) {
+ //make sure buffer has data
+ if (*size < 64*2) return -1;
+ size_t startIdx = 0;
+ uint8_t preamble[] = {0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,0,1,1};
+ if (!preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx))
+ return -2; //preamble not found
+ if (*size != 64) return -3; // wrong demoded size
+ return (int) startIdx;
+}
+