]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/util.c
ADD: Enio's intuative function for the command: "hw tune", where you plot the tunin...
[proxmark3-svn] / armsrc / util.c
index 0558fb947024e2095d3ad57ad566fb88ba4a506b..b1ef6ea084c57e855922a9ca214bfc2fe5b949bf 100644 (file)
@@ -85,6 +85,15 @@ int32_t le24toh (uint8_t data[3])
     return (data[2] << 16) | (data[1] << 8) | data[0];
 }
 
+//added here for parity calulations
+uint8_t oddparity(uint8_t bt)
+{
+   uint16_t v = bt;
+   v ^= v >> 4;
+   v &= 0xF;
+   return ((0x9669 >> v) & 1);
+}
+
 void LEDsoff()
 {
        LED_A_OFF();
Impressum, Datenschutz