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 DBGCODE( x )   x    75   #define dsmDP1( x )     if (DBG_ErrorPrintfFunc) DBG_ErrorPrintfFunc x    76   #define ERRPRINT(x, ...) \    77    if (DBG_ErrorPrintfFunc) DBG_ErrorPrintfFunc("%s:%d ERROR: " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);    78   #define DBG1(f, x, ...) \    79    if (DBG_ErrorPrintfFunc && (f & dsmDbgState)) DBG_ErrorPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);    80   #define ERRLOG(f, x, ...) \    81    if (DBG_ErrorPrintfFunc) DBG_ErrorPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);    82   #define DBGLOG(f, x, ...) \    83    if (DBG_ErrorPrintfFunc && (f & idp->dbgMask)) DBG_ErrorPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);    84   #define DBGERRCHK(err)  if (err) { ERRPRINT("err=%d",err) }    88   #define ERRPRINT(x, ...)    89   #define DBG1(f, x, ...)    90   #define ERRLOG(f, x, ...)    91   #define DBGLOG(f, x, ...)    92   #define DBGERRCHK(err)   104 #if DSM_DP_LEVEL >= 2   105   #define DBGCODE2( x )   x   106   #define dsmDP2( x )     if (DBG_WarnPrintfFunc) DBG_WarnPrintfFunc x   107   #define DBG2(f, x, ...) \   108    if (DBG_WarnPrintfFunc && (f & dsmDbgState)) DBG_WarnPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);   109   #define DBGHEX2(p,s) if (DBG_WarnPrintfFunc) DBG_HexDump(p,s);   110 void DBG_HexDump(U8BIT *data, U32BIT size );
   112   #define DBGCODE2( x )   114   #define DBG2(f, x, ...)   127 #if DSM_DP_LEVEL >= 3   128   #define DBGCODE3( x )   x   129   #define dsmDP3( x )   if (DBG_DebugPrintfFunc) DBG_DebugPrintfFunc x   130   #define DBG3(f, x, ...) \   131    if (DBG_DebugPrintfFunc && (f & dsmDbgState)) DBG_DebugPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);   132   #define DBGHEX3(p,s) if (DBG_WarnPrintfFunc) DBG_HexDump(p,s);   134   #define DBGCODE3( x )   136   #define DBG3(f, x, ...)   150 #if DSM_DP_LEVEL >= 4   151   #define dsmDP4( x )   if (DBG_InfoPrintfFunc) DBG_InfoPrintfFunc x   152   #define DBG4(f, x, ...) \   153    if (DBG_InfoPrintfFunc && (f & dsmDbgState)) DBG_InfoPrintfFunc("%s:%d " x "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__);   157   #define DBG4(f, x, ...)   166 #if (!defined(NDEBUG) && !defined(NO_DP))   167 extern F_Printf DBG_ErrorPrintfFunc;
   168 extern F_Printf DBG_WarnPrintfFunc;
   169 extern F_Printf DBG_DebugPrintfFunc;
   170 extern F_Printf DBG_InfoPrintffunc;
   171 extern U32BIT dsmDbgState;
 Interface to platform debug functions.