PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
module_debug.h
1#ifndef _MODULE_DEBUG_H
2#define _MODULE_DEBUG_H
3
4
5#define M_PRINTF(format, args...) printf("FatFs: " format, ##args)
6
7#ifdef DEBUG
8#define M_DEBUG M_PRINTF
9#else
10#define M_DEBUG(format, args...)
11#endif
12
13// u64 when being used in a printf statement is split into two u32 values
14#define U64_2XU32(val) \
15 u32 val##_u32[2]; \
16 memcpy(val##_u32, &val, sizeof(val##_u32))
17
18#ifdef DEBUG
19#define DEBUG_U64_2XU32(val) U64_2XU32(val)
20#else
21#define DEBUG_U64_2XU32(val) do { } while (0)
22#endif
23
24#endif