mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-12 18:25:07 +08:00
more defines
This commit is contained in:
parent
e701022257
commit
0219c6b125
1 changed files with 6 additions and 0 deletions
|
@ -141,4 +141,10 @@ extern int DBGLEVEL;
|
|||
# define DEC2BCD(dec) HornerScheme(dec, 10, 0x10)
|
||||
#endif
|
||||
|
||||
// bit stream operations
|
||||
#define TEST_BIT(data, i) (*(data + (i / 8)) >> (7 - (i % 8))) & 1
|
||||
#define SET_BIT(data, i) *(data + (i / 8)) |= (1 << (7 - (i % 8)))
|
||||
#define CLEAR_BIT(data, i) *(data + (i / 8)) &= ~(1 << (7 - (i % 8)))
|
||||
#define FLIP_BIT(data, i) *(data + (i / 8)) ^= (1 << (7 - (i % 8)))
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue