TrinityCore
|
Go to the source code of this file.
Macros | |
#define | _BIT(N, K) (((N >> (3*K)) & 1) << K) |
#define | _OCT_CODED_BIN(N) |
#define | BIN11(N) _OCT_CODED_BIN(0 ## N ## UL) |
Create a binary constant up to 11 digits long at compile time. More... | |
#define | HEX__(n) 0x##n##LU |
#define | B8__(x) |
#define | BIN8(d) ((unsigned char)B8__(HEX__(d))) |
Generate a 16-bit constant in binary notation, in 8-bit strings. More... | |
#define | BIN16(dmsb, dlsb) (((unsigned short)BIN8(dmsb) << 8) + BIN8(dlsb)) |
Generate a 16-bit constant in binary notation, in 8-bit strings. More... | |
#define | BIN32(dmsb, db2, db3, dlsb) |
Generate a 32-bit constant in binary notation, in 8-bit strings. More... | |
#define _BIT | ( | N, | |
K | |||
) | (((N >> (3*K)) & 1) << K) |
#define _OCT_CODED_BIN | ( | N | ) |
#define B8__ | ( | x | ) |
#define BIN11 | ( | N | ) | _OCT_CODED_BIN(0 ## N ## UL) |
Create a binary constant up to 11 digits long at compile time.
[By] Kaz Kylheku http://www.velocityreviews.com/forums/t620780-mathew-hendrys-macro-for-binary-integer-literals.html
Generate a 16-bit constant in binary notation, in 8-bit strings.
The most significant byte is first.
[Tom] Torfs http://groups.google.com/group/comp.arch.embedded/msg/9d430b6d3da12c8f
#define BIN32 | ( | dmsb, | |
db2, | |||
db3, | |||
dlsb | |||
) |
Generate a 32-bit constant in binary notation, in 8-bit strings.
The most significant byte is first.
[Tom] Torfs http://groups.google.com/group/comp.arch.embedded/msg/9d430b6d3da12c8f
Generate a 16-bit constant in binary notation, in 8-bit strings.
The most significant byte is first.
[Tom] Torfs http://groups.google.com/group/comp.arch.embedded/msg/9d430b6d3da12c8f
#define HEX__ | ( | n | ) | 0x##n##LU |