39 #ifdef DEBUG_ASSERT_STANDARD
45 #ifdef DEBUG_FUNCTIONS
47 #define FUNCTION_START(x) STB_SPDebugWrite("START: " # x)
48 #define FUNCTION_FINISH(x) STB_SPDebugWrite("END : " # x)
50 #define FUNCTION_START(x)
51 #define FUNCTION_FINISH(x)
57 #define ASSERT(assertion) if (!(assertion)) { STB_SPDebugAssertFail(__FILE__, __LINE__, # assertion); }
59 #ifdef DEBUG_ASSERT_STANDARD
60 #define ASSERT(assertion) assert(assertion)
61 #else // DEBUG_ASSERT_STANDARD
62 #define ASSERT(assertion)
63 #endif // DEBUG_ASSERT_STANDARD
64 #endif // DEBUG_ASSERT
66 #if defined(DEBUG_PRINTING_ENABLED)
68 #if !defined(NO_FUNC_ID)
69 #define DBGPRINT(x, ...) STB_SPDebugWrite( "%s:%d " x, __FUNCTION__, __LINE__, ##__VA_ARGS__);
70 #else // compiler does not support __FUNCTION__
71 #define DBGPRINT(x, ...) STB_SPDebugWrite( "%s:%d " x, __FILE__, __LINE__, ##__VA_ARGS__);
Function prototypes for HW control.