Sound Open Firmware
Loading...
Searching...
No Matches
bit.h File Reference

Go to the source code of this file.

Macros

#define BIT(b)
#define MASK(b_hi, b_lo)
#define SET_BIT(b, x)
#define SET_BITS(b_hi, b_lo, x)
#define GET_BIT(b, x)
#define GET_BITS(b_hi, b_lo, x)

Macro Definition Documentation

◆ BIT

#define BIT ( b)
Value:
(1UL << (b))

◆ GET_BIT

#define GET_BIT ( b,
x )
Value:
(((x) & (1ULL << (b))) >> (b))

◆ GET_BITS

#define GET_BITS ( b_hi,
b_lo,
x )
Value:
(((x) & MASK(b_hi, b_lo)) >> (b_lo))
#define MASK(b_hi, b_lo)
Definition bit.h:17

◆ MASK

#define MASK ( b_hi,
b_lo )
Value:
(((1ULL << ((b_hi) - (b_lo) + 1ULL)) - 1ULL) << (b_lo))

◆ SET_BIT

#define SET_BIT ( b,
x )
Value:
(((x) & 1) << (b))

◆ SET_BITS

#define SET_BITS ( b_hi,
b_lo,
x )
Value:
(((x) & ((1ULL << ((b_hi) - (b_lo) + 1ULL)) - 1ULL)) << (b_lo))