37 #if (defined(NDEBUG) || defined(NO_DP))
38 #define dsmAssert( assertion )
39 #define ASSERT(condition)
43 #define DSM_DP_LEVEL 0
47 #define dsmAssert( assertion ) if (!assertion) STB_SPDebugAssertFail(__FILE__, __LINE__, # assertion);
48 #define ASSERT(condition) if (!(condition)) STB_SPDebugAssertFail(__FILE__, __LINE__, # condition);
51 #define dsmAssert( assertion ) assert assertion
52 #define ASSERT(condition) assert(condition);
56 #define DSM_DP_LEVEL (1)
74 #define dsmDP1( x ) if (DBG_ErrorPrintfFunc) DBG_ErrorPrintfFunc x
75 #define ERRPRINT(x, ...) \
76 if (DBG_ErrorPrintfFunc) DBG_ErrorPrintfFunc("%s:%d ERROR: " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);
77 #define DBG1(f, x, ...) \
78 if (DBG_ErrorPrintfFunc && (f & dsmDbgState)) DBG_ErrorPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);
79 #define ERRLOG(f, x, ...) \
80 if (DBG_ErrorPrintfFunc) DBG_ErrorPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);
81 #define DBGLOG(f, x, ...) \
82 if (DBG_ErrorPrintfFunc && (f & idp->dbgMask)) DBG_ErrorPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);
83 #define DBGERRCHK(err) if (err) { ERRPRINT("err=%d",err) }
86 #define ERRPRINT(x, ...)
87 #define DBG1(f, x, ...)
88 #define ERRLOG(f, x, ...)
89 #define DBGLOG(f, x, ...)
90 #define DBGERRCHK(err)
102 #if DSM_DP_LEVEL >= 2
103 #define dsmDP2( x ) if (DBG_WarnPrintfFunc) DBG_WarnPrintfFunc x
104 #define DBG2(f, x, ...) \
105 if (DBG_WarnPrintfFunc && (f & dsmDbgState)) DBG_WarnPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);
108 #define DBG2(f, x, ...)
120 #if DSM_DP_LEVEL >= 3
121 #define dsmDP3( x ) if (DBG_DebugPrintfFunc) DBG_DebugPrintfFunc x
122 #define DBG3(f, x, ...) \
123 if (DBG_DebugPrintfFunc && (f & dsmDbgState)) DBG_DebugPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);
126 #define DBG3(f, x, ...)
139 #if DSM_DP_LEVEL >= 4
140 #define dsmDP4( x ) if (DBG_InfoPrintfFunc) DBG_InfoPrintfFunc x
141 #define DBG4(f, x, ...) \
142 if (DBG_InfoPrintfFunc && (f & dsmDbgState)) DBG_InfoPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);
146 #define DBG4(f, x, ...)
150 void STB_SPDumpWrite (U8BIT *data, U32BIT size );
157 #if (!defined(NDEBUG) && !defined(NO_DP))
158 extern F_Printf DBG_ErrorPrintfFunc;
159 extern F_Printf DBG_WarnPrintfFunc;
160 extern F_Printf DBG_DebugPrintfFunc;
161 extern F_Printf DBG_InfoPrintffunc;
162 extern U32BIT dsmDbgState;
Interface to platform debug functions.