mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
CHG: moved into header files.
This commit is contained in:
parent
0ccf8adac4
commit
e36b07efc4
7 changed files with 15 additions and 15 deletions
|
@ -9,24 +9,25 @@
|
|||
#ifndef __PARITY_H
|
||||
#define __PARITY_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern const uint8_t OddByteParity[256];
|
||||
extern const uint8_t EvenByteParity[256];
|
||||
|
||||
static inline uint8_t oddparity8(uint8_t bt)
|
||||
{
|
||||
return OddByteParity[bt];
|
||||
}
|
||||
|
||||
|
||||
extern const uint8_t EvenByteParity[256];
|
||||
|
||||
static inline uint8_t evenparity8(const uint8_t bt)
|
||||
{
|
||||
return EvenByteParity[bt];
|
||||
}
|
||||
|
||||
|
||||
static inline uint8_t evenparity32(uint32_t x)
|
||||
{
|
||||
x ^= x >> 16;
|
||||
|
@ -34,5 +35,8 @@ static inline uint8_t evenparity32(uint32_t x)
|
|||
return EvenByteParity[x & 0xff];
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PARITY_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue