mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 02:06:40 +00:00
[fnd] Added MIN(x,y), MAX(x,y) macros.
This commit is contained in:
parent
544d484690
commit
64035225d8
1 changed files with 3 additions and 0 deletions
|
@ -17,6 +17,9 @@ typedef uint8_t u8;
|
||||||
|
|
||||||
#define BIT(n) (1ULL << (n))
|
#define BIT(n) (1ULL << (n))
|
||||||
|
|
||||||
|
#define MIN(x,y) ((x) <= (y)? (x) : (y))
|
||||||
|
#define MAX(x,y) ((x) >= (y)? (x) : (y))
|
||||||
|
|
||||||
static inline uint16_t __local_bswap16(uint16_t x) {
|
static inline uint16_t __local_bswap16(uint16_t x) {
|
||||||
return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
|
return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue