]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - common/lfdemod.c
fix: forgot to remove this when merging piwi's fixes.
[proxmark3-svn] / common / lfdemod.c
index 0f8dd4522c2127e56f493d8206b381a9f029e497..9a4051c9b125a29bc7baabf1a82d2d4b1e37de73 100644 (file)
@@ -282,6 +282,16 @@ int manrawdecode(uint8_t * BitStream, size_t *size, uint8_t invert)
        return bestErr;
 }
 
+uint32_t manchesterEncode2Bytes(uint16_t datain) {
+       uint32_t output = 0;
+       uint8_t curBit = 0;
+       for (uint8_t i=0; i<16; i++) {
+               curBit = (datain >> (15-i) & 1);
+               output |= (1<<(((15-i)*2)+curBit));
+       }
+       return output;
+}
+
 //by marshmellow
 //encode binary data into binary manchester 
 int ManchesterEncode(uint8_t *BitStream, size_t size)
Impressum, Datenschutz