mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07: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)
|
# define DEC2BCD(dec) HornerScheme(dec, 10, 0x10)
|
||||||
#endif
|
#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
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue