General cleanup, use _BV
This commit is contained in:
1 parent
69a6d26c80
commit
b41f41589a
19 files changed
+56
-81
No files matched your search
@@ -84,17 +84,13 @@
|
||||
#define _BV(n) (1<<(n))
|
||||
#define TEST(n,b) (!!((n)&_BV(b)))
|
||||
#define SET_BIT_TO(N,B,TF) do{ if (TF) SBI(N,B); else CBI(N,B); }while(0)
|
||||
|
||||
#ifndef SBI
|
||||
#define SBI(A,B) (A |= (1 << (B)))
|
||||
#define SBI(A,B) (A |= _BV(B))
|
||||
#endif
|
||||
|
||||
#ifndef CBI
|
||||
#define CBI(A,B) (A &= ~(1 << (B)))
|
||||
#define CBI(A,B) (A &= ~_BV(B))
|
||||
#endif
|
||||
|
||||
#define TBI(N,B) (N ^= _BV(B))
|
||||
|
||||
#define _BV32(b) (1UL << (b))
|
||||
#define TEST32(n,b) !!((n)&_BV32(b))
|
||||
#define SBI32(n,b) (n |= _BV32(b))
|
||||
|
||||
Reference in new issue
Block a user