mirror of
https://github.com/jakcron/nstool
synced 2024-11-22 21:49:30 +00:00
[fnd] Add more macros to BitMath.h
This commit is contained in:
parent
dd1a97aec2
commit
b136d646d0
1 changed files with 2 additions and 2 deletions
|
@ -1,8 +1,6 @@
|
||||||
/*
|
/*
|
||||||
BitMath.h
|
BitMath.h
|
||||||
(c) 2018 Jakcron
|
(c) 2018 Jakcron
|
||||||
|
|
||||||
This is a 0x40 byte header to prepend to raw EXEFS .code binaries that provide enough data to be equivalent to an ELF.
|
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -12,3 +10,5 @@ This is a 0x40 byte header to prepend to raw EXEFS .code binaries that provide e
|
||||||
// Bit math macros
|
// Bit math macros
|
||||||
#define _BIT(n) BIT(n)
|
#define _BIT(n) BIT(n)
|
||||||
#define _HAS_BIT(val, bit) (((val) & _BIT(bit)) != 0)
|
#define _HAS_BIT(val, bit) (((val) & _BIT(bit)) != 0)
|
||||||
|
#define _SET_BIT(val, bit) ((val) |= _BIT(bit))
|
||||||
|
#define _BITMASK(width) (_BIT(width)-1)
|
Loading…
Reference in a new issue