1 /*---------------------------------------------------------------------------* 2 Project: TwlSDK - WM - libraries 3 File: wm_private.h 4 5 Copyright 2003-2008 Nintendo. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Date:: 2008-09-18#$ 14 $Rev: 8573 $ 15 $Author: okubata_ryoma $ 16 *---------------------------------------------------------------------------*/ 17 18 #ifndef LIBRARIES_WM_PRIVATE_H_ 19 #define LIBRARIES_WM_PRIVATE_H_ 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 /*===========================================================================*/ 26 27 28 #include <nitro.h> 29 30 #ifdef SDK_ARM7 31 #include <nitro_wl/ARM7/WlLib.h> 32 #endif 33 34 /*---------------------------------------------------------------------------* 35 Constant Definitions 36 *---------------------------------------------------------------------------*/ 37 38 //#define WM_DEBUG // WM debug flag (mainly ARM7) 39 //#define WM_DEBUG_DATASHARING // DataSharing-related debug message flag (ARM9) 40 //#define WM_DEBUG_CALLBACK // ARM9 wireless PXI interrupt debug display flag (ARM9) 41 //#define WM_DEBUG_AIDBITMAP // ARM9's AID BITMAP-related debug display flag (ARM9) 42 43 /*---------------------------------------------------------------------------* 44 Macro Definitions 45 *---------------------------------------------------------------------------*/ 46 47 #ifdef SDK_DEBUG 48 #define WM_WARNING(...) \ 49 ( (void) ( WMi_Warning(__FILE__, __LINE__, __VA_ARGS__) ) ) 50 #else 51 #define WM_WARNING(...) ((void) 0) 52 #endif 53 54 #ifdef WM_DEBUG 55 #define WM_ASSERT(exp) \ 56 ( (void) ( (exp) || (WMi_Warning(__FILE__, __LINE__, "Failed assertion " #exp), 0) ) ) 57 #define WM_ASSERTMSG(exp, ...) \ 58 ( (void) ( (exp) || (WMi_Warning(__FILE__, __LINE__, __VA_ARGS__), 0) ) ) 59 #define WM_DPRINTF WMi_Printf 60 #else // WM_DEBUG 61 #define WM_ASSERT(exp) ((void) 0) 62 #define WM_ASSERTMSG(...) ((void) 0) 63 #define WM_DPRINTF(...) ((void) 0) 64 #endif // WM_DEBUG 65 66 #ifndef SDK_FINALROM 67 #define WMi_Printf OS_TPrintf 68 #define WMi_Warning OSi_TWarning 69 #else 70 #define WMi_Printf(...) ((void) 0) 71 #define WMi_Warning(...) ((void) 0) 72 #endif 73 74 75 /*===========================================================================*/ 76 77 #ifdef __cplusplus 78 } /* extern "C" */ 79 #endif 80 81 #endif /* LIBRARIES_WM_PRIVATE_H_ */ 82 83 /*---------------------------------------------------------------------------* 84 End of file 85 *---------------------------------------------------------------------------*/ 86