Skip to content

Commit

Permalink
Add support for BIT(x) macro
Browse files Browse the repository at this point in the history
This just adds a convenience wrapper for (1 << x) expressions.
Using (1UL << x) should be save for both 32 and 64 bit systems.

Signed-off-by: Benedikt Niedermayr <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
bniedermayr authored and jan-kiszka committed Nov 20, 2024
1 parent 4339160 commit 3de5ba0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ VOID PrintC(const UINT8 color, const CHAR16 *fmt, ...);
#else
#define INFO(fmt, ...) do { } while (0)
#endif

#define BIT(x) (1UL << (x))

0 comments on commit 3de5ba0

Please sign in to comment.